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

i tried :

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

        location / {

               # index index.php;
                proxy_redirect /;
                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 : ==


The config for apache is :

Alias /app1 /var/www/app1

  <Directory "/var/www/app1">    
    Options -Indexes
    AllowOverride None
    Order allow,deny
    Allow from all
  • Check apache's config – Alexey Ten Jun 6 '16 at 4:21
  • i have checked one million of times ... but i dont understand why it doesn't work – Gilles Grandguillaume Jun 8 '16 at 3:02
  • shame on me : browser cache error ... – Gilles Grandguillaume Jun 8 '16 at 3:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.