Não consigo descobrir nada que dê errado.
apêndice com padrão 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>
o index.php está sob a pasta.
/var/www/AppServices/Server_API$ ls
. .. admin.php .htaccess index.php infor.php message.php
Quando eu POSTAR JSON para este URL
xxx.xxx.xxx.xxx:8002/server_api/message
Recebi erro 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>
Parece que o arquivo .htaccess na mesma pasta está funcionando. Ele traduz o URL " link " para " link ". Mas o apache2 não pode descobrir o index.php na mesma pasta.
- Editar -
no Apache2 error.log:
[Sun Apr 14 21:08:17 2013] [error] [client 127.0.0.1] File does not exist: /var/www/AppServices/public/var
não há var na pasta pública. Mas por que ????
Tags .htaccess apache-2.2