ahojte, potreboval by som poradit ohladom nastavenia apache2
Problem je, ze miesto zobrazenia stranky mi ju ponukne na stiahnutie.
Mal som nejaky problem s ip a po zmene mi to proste nejde. V procesoch mi navyse bezi strasne vela apache procesov:
ps -ef | grep apache:
root 2789 1 0 Jul14 ? 00:00:00 /usr/sbin/apache-perl
www-data 2797 2789 0 Jul14 ? 00:00:00 /usr/sbin/apache-perl
www-data 2798 2789 0 Jul14 ? 00:00:00 /usr/sbin/apache-perl
www-data 2799 2789 0 Jul14 ? 00:00:00 /usr/sbin/apache-perl
www-data 2800 2789 0 Jul14 ? 00:00:00 /usr/sbin/apache-perl
www-data 2801 2789 0 Jul14 ? 00:00:00 /usr/sbin/apache-perl
www-data 3042 2789 0 Jul14 ? 00:00:00 /usr/sbin/apache-perl
www-data 3043 2789 0 Jul14 ? 00:00:00 /usr/sbin/apache-perl
www-data 3044 2789 0 Jul14 ? 00:00:00 /usr/sbin/apache-perl
root 4192 4045 0 00:21 pts/0 00:00:00 grep apach
Po spusteni prehliadaca a zadania localhost mi nevypisuje ani ziadne moduly:
Apache/1.3.34 Server at 127.0.0.1 Port 80
mali by tam byt mod_php5 a mod_perl :(
pri restarte apache hlasi chybu:
Forcing reload of web server (apache2)...apache2: Could not reliably determine the server's fully qualified domain name, using root.localdomain for ServerName
httpd (no pid file) not running
apache2: Could not reliably determine the server's fully qualified domain name, using root.localdomain for ServerName
(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
failed!
/sites-available
NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
# RedirectMatch ^/$ /apache2-default/
</Directory>
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory "/var/www/cgi-bin/">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
AddHandler cgi-script .cgi .pl
Options ExecCGI
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
no a nakoniec pre istotu /etc/hostst
127.0.0.1 localhost debian.localdomain root.localdomain
127.0.1.1 debian.sk-kosice.t-systems.sk debian
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
První věc, kterou vidím... Tu chybové hlášky při restartu vám to hlásí protože nespouštíte příkaz pro restart jako root:)
K tomu php... mrkněte se, jestli máte skutečně zapojený modul php
apache2ctl status
Ano toho roota som si nevsimol :D
Viem s cim to moze suvisiet ale neviem ako to riesit. Vytvoril som virtualny stroj a ten potom rozdistribuoval kolegom. Avsak niektori dali Keep configuration a maju tu istu IP a MAC ako ja (celkovo sme traja z 9 s tou IP a MAC)
//Momentalne to vyzera tak, ze sa aspon mne podarilo zmenit si IP.
Takze po spusteni ako root ide restart v poriadku bez hlasok o pocuvani na porte :80. Ide aj PHP, Perl vsak nie.
Vypis z apache2ctl status:
root:~# apache2ctl status
Forbidden
You don't have permission to access /server-status on this server.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Apache/2.2.3 (Debian) PHP/5.2.0-8+etch15 mod_perl/2.0.2 Perl/v5.8.8 Server at
localhost Port 80
Takisto sa neviem dostat do mojho adresara cgi-bin a po spusteni perlovych skriptov hlasi Forbidden.