Назад | Перейти на главную страницу

Apache2 - ошибка 404 - при переносе файлов php из Windows в Ubuntu возникли ошибки

Я не могу обнаружить, что что-то пошло не так.

приложение с 00-по умолчанию

AccessFileName .htaccess
Alias /api "/var/www/AppServices/public"
Alias /server_api "/var/www/AppServices/Server_API"
Alias /client_api "/var/www/AppServices/Client_API"
Alias /secure_api "/var/www/AppServices/Secure_API"

Listen 8002
<VirtualHost *:8002>
    DocumentRoot /var/www/AppServices/public
    ServerName .local

    # This should be omitted in the production environment
    SetEnv APPLICATION_ENV development
    <Directory "/var/www/AppServices/public">
            Options Indexes MultiViews FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
    </Directory>

</VirtualHost>

.htaccess

<IfModule mod_rewrite.c>
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d [OR]
RewriteCond %{REQUEST_FILENAME} !-s [OR]
RewriteRule ^(.*)$ index.php?request=$1 [QSA,NC,L]

RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ index.php [NC,L]

RewriteCond %{REQUEST_FILENAME} -s
RewriteRule ^(.*)$ index.php [NC,L]
</IfModule>

. index.php находится в папке.

/var/www/AppServices/Server_API$ ls
.  ..  admin.php  .htaccess  index.php  infor.php  message.php

Когда я отправляю JSON на этот URL

xxx.xxx.xxx.xxx:8002/server_api/message

У меня ошибка 404:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /var/www/AppServices/Server_API/index.php was not found on this server.</p>
<hr>
<address>Apache/2.2.22 (Ubuntu) Server at xxx.xxx.xxx.xxx Port 8002</address>
</body></html>

Похоже, что файл .htaccess в той же папке работает. Он переводит URL "http://xxx.xxx.xxx.xxx:8002/server_api/message"к"http://xxx.xxx.xxx.xxx:8002/server_api/index.php?request=message". Но apache2 не может найти index.php в той же папке.

- Редактировать -

в журнале ошибок Apache2:

[Вс, 14 апр, 21:08:17 2013] [ошибка] [клиент 127.0.0.1] Файл не существует: / var / www / AppServices / public / var

в общей папке нет var. Но почему????