0

i need to serve http://192.168.0.23/app1 (apache) to nginx http://app1.domain.com (nginx)

i tried :

server
{
        listen 80;
        access_log off;
        server_name app1.domain.com;
        # index index.php;

        location / {

               # index index.php;
                proxy_pass http://192.168.0.23/app1/;
                proxy_redirect http://192.168.0.23/app1/ /;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
}

the web site http://app1.domain.com error :

The requested URL /app1/app1/ was not found on this server.

but the url http://app1.domain.com/index.php work, how to redirect directly http://app1.domain.com to http://app1.domain.com/index.php ??

it work correctly in apache : http://192.168.0.23/app1 == http://192.168.0.23/app1/index.php

EDIT :

The config for apache is :

Alias /app1 /var/www/app1

  <Directory "/var/www/app1">    
    Options -Indexes
    AllowOverride None
    Order allow,deny
    Allow from all
  </Directory>

0 Answers0