Fórum Ubuntu CZ/SK
Ostatní => Ubuntu Server => Téma založeno: tomas777 02 Dubna 2010, 13:25:30
-
Nainstaloval jsem si Apache s MySQL a PHP do Ubuntu 10.04 Beta1 a nerozchodil jsem ho, před tím jsem ho instaloval tak 100x v Ubuntu 9.04 a vždy bez problému. Zkoušel jsem krok po kroku wiki a nic. Chybové hlášení z Firefoxu "Chyby 403, Forbidden"
-
sudo chown www-data -R /var/www/
v tom horším případě
sudo chmod 777 -R /var/www
nepomáhá?
-
jo to jsem taky zkoušel a nic právě proto píšu
-
Mám aktivovaný rewrite a editoval jsem i /etc/apache2/sites-available/default a restartoval jsem i apache????
-
No ta chyba je každopádně, že to nemůže někam vlízt... to je divné... a není DocumentRoot někam jinam než do /var/www ???
Popřípadě logy z apache něco ukazují?
-
DocumentRoot je originál po instalaci ???
-
a ty logy?
případně si otevři terminál
sudo tail -f /var/log/apache2/error.log
a pozoruj co ti tam naskočí...
Ale je to divný, přístup by tam měl mít. Tak co se mu může nelíbit ;D
-
tomas@tomas:~$ sudo tail -f /var/log/apache2/error.log
[sudo] password for tomas:
[Fri Apr 02 15:57:51 2010] [error] [client 127.0.0.1] PHP Warning: include(soubory/00001.txt): failed to open stream: Permission denied in /var/www/index.php on line 96
[Fri Apr 02 15:57:51 2010] [error] [client 127.0.0.1] PHP Warning: include(): Failed opening 'soubory/00001.txt' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/index.php on line 96
[Fri Apr 02 15:57:51 2010] [error] [client 127.0.0.1] PHP Warning: include(soubory/00017.html): failed to open stream: Permission denied in /var/www/index.php on line 97
[Fri Apr 02 15:57:51 2010] [error] [client 127.0.0.1] PHP Warning: include(): Failed opening 'soubory/00017.html' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/index.php on line 97
[Fri Apr 02 15:57:51 2010] [error] [client 127.0.0.1] PHP Warning: include(soubory/00043.txt): failed to open stream: Permission denied in /var/www/index.php on line 103
[Fri Apr 02 15:57:51 2010] [error] [client 127.0.0.1] PHP Warning: include(): Failed opening 'soubory/00043.txt' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/index.php on line 103
[Fri Apr 02 15:57:51 2010] [error] [client 127.0.0.1] PHP Warning: include(soubory/00040.txt): failed to open stream: Permission denied in /var/www/index.php on line 103
[Fri Apr 02 15:57:51 2010] [error] [client 127.0.0.1] PHP Warning: include(): Failed opening 'soubory/00040.txt' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/index.php on line 103
[Fri Apr 02 15:57:51 2010] [crit] [client 127.0.0.1] (13)Permission denied: /var/www/css/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, referer: http://127.0.0.1/
[Fri Apr 02 15:57:51 2010] [crit] [client 127.0.0.1] (13)Permission denied: /var/www/css/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, referer: http://127.0.0.1/
-
Tak nevím ve woknech mám nainstalovaný poslední xamp a jede to, php memá žádmé chybové hlášky
-
Prosím koukněte ješťě na to někdo.
Výpis z /etc/apache2/sites-available/default
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /media/Dokumenty/Tomas/WWW/WWW
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /media/Dokumenty/Tomas/WWW/WWW/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
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
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>
sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart
a výsledek
Forbidden
You don't have permission to access / on this server.
Apache/2.2.14 (Ubuntu) Server at 127.0.0.1 Port 80
-
sudo tail -f /var/log/apache2/error.log
[Sun Apr 11 13:22:52 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /historie/index.htm denied, referer: http://127.0.0.1/
[Sun Apr 11 13:23:01 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /fotky_interier/index.html denied, referer: http://127.0.0.1/
[Sun Apr 11 13:23:01 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /fotky_interier/index.cgi denied, referer: http://127.0.0.1/
[Sun Apr 11 13:23:01 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /fotky_interier/index.pl denied, referer: http://127.0.0.1/
[Sun Apr 11 13:23:01 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /fotky_interier/index.php denied, referer: http://127.0.0.1/
[Sun Apr 11 13:23:01 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /fotky_interier/index.xhtml denied, referer: http://127.0.0.1/
[Sun Apr 11 13:23:01 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /fotky_interier/index.htm denied, referer: http://127.0.0.1/
[Sun Apr 11 13:33:32 2010] [notice] caught SIGTERM, shutting down
[Sun Apr 11 13:33:33 2010] [notice] Apache/2.2.14 (Ubuntu) PHP/5.3.2-1ubuntu4 with Suhosin-Patch configured -- resuming normal operations
[Sun Apr 11 13:33:39 2010] [crit] [client 127.0.0.1] (13)Permission denied: /media/Dokumenty/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
-
Tak dnes jsem zkusil nainstalovat 9.04 a server jsem rozjel na poprve a po přechodu na 9.10 nejde a jak nainstaluji 10.04 beta 2 tak taky nic.
-
vyřešeno. nové vydání 10.04 jede OK a je super.
-
Chybu 403 mi házel .htaccess. Musel jsem mu nastavit práva na 777 jinak mi stránky vyhazovali neustale tuto chybu.