Попробуй "sudo ln -s /etc/apache2/mods-available/php5.conf /etc/apache2/mods-enabled/php5.conf
sudo ln -s /etc/apache2/mods-available/php5.load /etc/apache2/mods-enabled/php5.load
Модераторы: SLEDopit, Модераторы разделов
ключевое здесь AddType
Кстати, а если просто положить html файл в тут папку, где лежит index.php - он откроется в браузере?
Попробуй "sudo ln -s /etc/apache2/mods-available/php5.conf /etc/apache2/mods-enabled/php5.conf
sudo ln -s /etc/apache2/mods-available/php5.load /etc/apache2/mods-enabled/php5.load
Код: Выделить всё
Ошибка!
Не удалось подключиться к удалённому серверу
Вы попытались получить доступ к адресу http://localhost/index.php, который сейчас недоступен. Убедитесь, что веб-адрес (URL) введен правильно, и попытайтесь перезагрузить страницу.
Убедитесь, что соединение с Интернет активно, и проверьте, работают ли другие приложения, использующие это соединение.
Код: Выделить всё
sudo /etc/init.d/apache2 restart
Что падает в консоль после запуска
Код: Выделить всё
* Restarting web server apache2 * We failed to correctly shutdown apache, so we're now killing all running apache processes. This is almost certainly suboptimal, so please make sure your system is working as you'd expect now!
... waiting apache2: Syntax error on line 185 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load: Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: cannot open shared object file: No such file or directory
[fail]
Так, приведи сюда содержимое /var/log/apache2/error.log
Код: Выделить всё
[Sun May 10 07:30:03 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Mon May 11 00:55:00 2009] [notice] caught SIGTERM, shutting down
[Mon May 11 13:16:20 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Mon May 11 15:02:01 2009] [notice] caught SIGTERM, shutting down
[Mon May 11 19:16:23 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Mon May 11 21:43:18 2009] [error] [client 127.0.0.1] File does not exist: /var/www/tools
[Mon May 11 21:43:18 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico, referer: http://localhost/tools/
[Mon May 11 21:55:21 2009] [notice] caught SIGTERM, shutting down
[Mon May 11 21:55:22 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Mon May 11 21:55:47 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico, referer: http://localhost/
[Mon May 11 21:59:22 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico, referer: http://localhost/
[Mon May 11 22:06:21 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Mon May 11 22:06:24 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Mon May 11 22:06:24 2009] [error] [client 127.0.0.1] File does not exist: /var/www/tools
[Mon May 11 22:06:29 2009] [error] [client 127.0.0.1] File does not exist: /var/www/tool
[Mon May 11 22:28:10 2009] [notice] caught SIGTERM, shutting down
[Mon May 11 22:29:17 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Mon May 11 23:30:47 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www/phpmyadmin
[Mon May 11 23:30:47 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Mon May 11 23:30:50 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Mon May 11 23:30:57 2009] [error] [client 127.0.0.1] File does not exist: /var/www/tools
[Mon May 11 23:31:13 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico, referer: http://localhost/
[Mon May 11 23:31:19 2009] [error] [client 127.0.0.1] File does not exist: /var/www/[h[myadmin
[Mon May 11 23:31:27 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www/phpmyadmin
[Mon May 11 23:31:37 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Mon May 11 23:33:59 2009] [notice] caught SIGTERM, shutting down
[Mon May 11 23:34:00 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Mon May 11 23:34:18 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www/phpmyadmin
[Mon May 11 23:40:51 2009] [notice] caught SIGTERM, shutting down
[Tue May 12 07:38:03 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Tue May 12 07:42:05 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www/phpmyadmin
[Tue May 12 07:42:05 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico, referer: http://localhost/phpmyadmin
[Tue May 12 07:42:08 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www/phpmyadmin
[Tue May 12 07:42:08 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www/phpmyadmin
[Tue May 12 08:46:45 2009] [error] [client 127.0.0.1] File does not exist: /var/www/tools
[Tue May 12 08:46:45 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Tue May 12 08:46:48 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Tue May 12 08:46:51 2009] [error] [client 127.0.0.1] File does not exist: /var/www/tools
[Tue May 12 11:09:36 2009] [notice] caught SIGTERM, shutting down
[Tue May 12 12:02:50 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Tue May 12 12:09:30 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www/phpmyadmin
[Tue May 12 12:09:30 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico, referer: http://localhost/phpmyadmin
[Tue May 12 17:40:03 2009] [notice] caught SIGTERM, shutting down
[Tue May 12 18:17:29 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Tue May 12 18:22:16 2009] [notice] caught SIGTERM, shutting down
[Tue May 12 18:26:03 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Tue May 12 18:32:42 2009] [notice] caught SIGTERM, shutting down
[Tue May 12 19:36:50 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Tue May 12 22:04:03 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www/phpmyadmin
[Tue May 12 22:04:03 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico, referer: http://localhost/phpmyadmin
[Tue May 12 22:04:06 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www/phpmyadmin
[Tue May 12 22:07:18 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www/phpmyadmin
[Tue May 12 22:07:44 2009] [notice] caught SIGTERM, shutting down
[Tue May 12 22:07:45 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Tue May 12 22:07:47 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www/phpmyadmin
[Tue May 12 22:07:47 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico, referer: http://localhost/phpmyadmin/
[Tue May 12 22:07:48 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www/phpmyadmin
[Tue May 12 22:07:48 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico, referer: http://localhost/phpmyadmin/
[Tue May 12 22:07:48 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www/phpmyadmin
[Tue May 12 22:07:48 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico, referer: http://localhost/phpmyadmin/
[Tue May 12 22:07:49 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www/phpmyadmin
[Tue May 12 22:07:49 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico, referer: http://localhost/phpmyadmin/
[Tue May 12 22:09:15 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www/phpmyadmin
[Tue May 12 22:17:46 2009] [notice] Graceful restart requested, doing restart
Warning: DocumentRoot [/var/www/] does not exist
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Tue May 12 22:17:46 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Tue May 12 22:25:11 2009] [notice] Graceful restart requested, doing restart
Warning: DocumentRoot [/var/www/] does not exist
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Tue May 12 22:25:11 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Tue May 12 22:25:15 2009] [notice] Graceful restart requested, doing restart
Warning: DocumentRoot [/var/www/] does not exist
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Tue May 12 22:25:15 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Tue May 12 22:25:30 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www
[Tue May 12 22:25:39 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www
[Tue May 12 22:26:23 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www
[Tue May 12 22:26:23 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www
[Tue May 12 22:26:23 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www, referer: http://localhost/phpmyadmin/
[Tue May 12 22:26:27 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www
[Tue May 12 22:27:49 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www
[Tue May 12 22:37:25 2009] [notice] caught SIGTERM, shutting down
[Tue May 12 22:37:26 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Tue May 12 22:42:55 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www
[Tue May 12 22:43:02 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www
[Tue May 12 22:43:29 2009] [notice] caught SIGTERM, shutting down
[Tue May 12 22:44:38 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Tue May 12 22:45:42 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www
[Tue May 12 22:45:42 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www
[Tue May 12 22:45:42 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www
[Tue May 12 22:45:43 2009] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www, referer: http://localhost/phpmyadmin/
[Tue May 12 22:55:30 2009] [notice] Graceful restart requested, doing restart
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Tue May 12 22:55:30 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Tue May 12 22:56:22 2009] [notice] caught SIGTERM, shutting down
[Tue May 12 23:04:59 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Tue May 12 23:05:38 2009] [notice] caught SIGTERM, shutting down
[Tue May 12 23:05:45 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Tue May 12 23:05:56 2009] [notice] caught SIGTERM, shutting down
[Tue May 12 23:05:57 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Tue May 12 23:08:35 2009] [error] [client 127.0.0.1] File does not exist: /var/www/phpmyadmin
[Tue May 12 23:08:36 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Tue May 12 23:08:39 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
[Tue May 12 23:09:11 2009] [error] [client 127.0.0.1] File does not exist: /var/www/phpmyadmin
[Tue May 12 23:09:12 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico, referer: http://localhost/phpmyadmin/
[Tue May 12 23:10:20 2009] [error] [client 127.0.0.1] File does not exist: /var/www/phpmyadmin
[Tue May 12 23:10:21 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico, referer: http://localhost/phpmyadmin/
[Tue May 12 23:14:10 2009] [notice] caught SIGTERM, shutting down
[Tue May 12 23:15:04 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Tue May 12 23:16:02 2009] [notice] caught SIGTERM, shutting down
[Tue May 12 23:16:53 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Tue May 12 23:17:03 2009] [notice] caught SIGTERM, shutting down
[Tue May 12 23:19:54 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Wed May 13 10:42:15 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Wed May 13 11:35:22 2009] [notice] caught SIGTERM, shutting down
[Wed May 13 11:36:32 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Wed May 13 12:20:15 2009] [error] [client 127.0.0.1] File does not exist: /var/www
[Wed May 13 12:20:15 2009] [error] [client 127.0.0.1] File does not exist: /var/www, referer: http://localhost/phpmyadmin/
[Wed May 13 12:48:27 2009] [error] [client 127.0.0.1] File does not exist: /var/www
[Wed May 13 12:48:27 2009] [error] [client 127.0.0.1] File does not exist: /var/www, referer: http://localhost/phpmyadmin/
[Wed May 13 13:14:46 2009] [notice] caught SIGTERM, shutting down
[Wed May 13 16:11:35 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Wed May 13 16:23:04 2009] [error] [client 127.0.0.1] File does not exist: /var/www, referer: http://linuxforum.ru/index.php?showtopic=92457&st=0&gopid=860392&
[Wed May 13 16:23:04 2009] [error] [client 127.0.0.1] File does not exist: /var/www, referer: http://localhost/
[Wed May 13 16:31:00 2009] [error] [client 127.0.0.1] File does not exist: /var/www, referer: http://linuxforum.ru/index.php?showtopic=92457&st=0&gopid=860392&
[Wed May 13 16:31:00 2009] [error] [client 127.0.0.1] File does not exist: /var/www, referer: http://localhost/
[Wed May 13 17:15:36 2009] [notice] caught SIGTERM, shutting down
[Wed May 13 17:15:37 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Wed May 13 17:15:39 2009] [error] [client 127.0.0.1] File does not exist: /var/www, referer: http://habrahabr.ru/blogs/ubuntu/20736/
[Wed May 13 17:16:02 2009] [notice] caught SIGTERM, shutting down
[Wed May 13 17:16:08 2009] [notice] Apache/2.2.9 (Ubuntu) configured -- resuming normal operations
[Wed May 13 20:56:08 2009] [notice] Graceful restart requested, doing restart
Warning: DocumentRoot [/var/l/www/phpMyAdmin] does not exist
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Wed May 13 20:56:08 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
[Wed May 13 20:56:08 2009] [notice] Apache/2.2.9 (Ubuntu) mod_auth_kerb/5.3 mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations
[Wed May 13 20:56:10 2009] [notice] Graceful restart requested, doing restart
Warning: DocumentRoot [/var/l/www/phpMyAdmin] does not exist
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Wed May 13 20:56:10 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613/imagick.so' - /usr/lib/php5/20060613/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
[Wed May 13 20:56:10 2009] [notice] Apache/2.2.9 (Ubuntu) mod_auth_kerb/5.3 PHP/5.2.6-2ubuntu4.2 with Suhosin-Patch mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations
[Wed May 13 20:58:32 2009] [notice] caught SIGTERM, shutting down
[Wed May 13 20:58:37 2009] [notice] Apache/2.2.9 (Ubuntu) mod_auth_kerb/5.3 mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations
[Wed May 13 21:40:36 2009] [notice] caught SIGTERM, shutting down
[Wed May 13 21:41:29 2009] [notice] Apache/2.2.9 (Ubuntu) mod_auth_kerb/5.3 mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations
[Wed May 13 23:57:21 2009] [error] [client 127.0.0.1] File does not exist: /var/www/index.html
[Wed May 13 23:57:21 2009] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico, referer: http://localhost/index.html
[Thu May 14 00:01:34 2009] [notice] caught SIGTERM, shutting down
Установи пакет libapache2-mod-php5
Код: Выделить всё
* Restarting web server apache2 Syntax error on line 11 of /etc/apache2/sites-enabled/000-default:
Illegal option Indexes,
[fail]
P.S. И, кстати, чем не нравится /var/www/?
Код:
<VirtualHost *:80>
ServerAdmin lena@unknown.jp
DocumentRoot /home/unwind/www/
<Directory />
AllowOverride None
Order allow,deny
Deny from all
</Directory>
<Directory /home/unwind/www/>
Options Indexes MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
Код: Выделить всё
<VirtualHost *:80>
ServerAdmin lena@unknown.jp
DocumentRoot /home/unwind/www/
<Directory />
AllowOverride None
Order allow,deny
Deny from all
</Directory>
<Directory /home/unwind/www/>
Options Indexes, MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
Код: Выделить всё
* Restarting web server apache2 apache2: Syntax error on line 281 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/sites-enabled/000-default: /etc/apache2/sites-enabled/000-default:1: <VirtualHost> was not closed.
[fail]
Faruna писал(а): ↑14.05.2009 00:15strah , всёравно терминал ругаеться.
Код: Выделить всё
* Restarting web server apache2 apache2: Syntax error on line 281 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/sites-enabled/000-default: /etc/apache2/sites-enabled/000-default:1: <VirtualHost> was not closed. [fail]
/var/www можно и на себя переправить.
Или отдать каталог пользователю apache, а себя добавить в его группу.
P.S. исправь файл, опять запусти апач - данные с консоли сюда.
Хмм, про </VirtualHost> в конце файла точно не забыла?
Код: Выделить всё
root@unwind-desktop:~# /etc/init.d/apache2 restart
* Restarting web server apache2 Syntax error on line 11 of /etc/apache2/sites-enabled/000-default:
Illegal option Indexes,
[fail]
Он говорит тебе номера строк с ошибкой. И файлы, в которых ошибка.
Самое простое - кидать сюда строки. Исправим - вернешь обратно.
Faruna писал(а): ↑14.05.2009 00:22Хмм, про </VirtualHost> в конце файла точно не забыла?
Забыла, но щас добавила.
Теперь опять запустила и опять ругаеться.
Вот как на этот раз.
Код: Выделить всё
root@unwind-desktop:~# /etc/init.d/apache2 restart * Restarting web server apache2 Syntax error on line 11 of /etc/apache2/sites-enabled/000-default: Illegal option Indexes, [fail]
Предлогаю снести весь этот LAMP, и начать с "чистого листа"
Пошагово? Не замучаемся, кстати?
Код: Выделить всё
* Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[ OK ]
Faruna писал(а): ↑14.05.2009 00:24Вот вообщем:
Код: Выделить всё
* Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName [ OK ]