A
A
AlexVoronin2016-03-02 15:32:56
Nginx
AlexVoronin, 2016-03-02 15:32:56

Request to Apche bypassing Nginx?

Hello.
There is a server on Ubuntu, Nginx+Apache .
Installed eXtplorer file manager. According to the instructions, I specified an alias for Apache Alias ​​/extplorer /usr/share/extplorer.
But here's the problem.
When accessing http://<YOURSERVER>/extplorer
Nginx, it gives a 500 error. Naturally, Nginx knows nothing about extplorer.
I decided to register such an alias Nginx.

server {
      server_name localhost;
      disable_symlinks if_not_owner;
      listen 80;
      include /etc/nginx/vhosts-includes/*.conf;

        location /extplorer/ {
            alias /usr/share/extplorer/;
        }
}

But it doesn't help :( How can Nginx
explain that there is such a folder /usr/share/extplorer/
?http://<YOURSERVER>/extplorer

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Nemiro, 2016-03-02
@AlekseyNemiro

server {
  server_name localhost;
  disable_symlinks if_not_owner;
  listen 80;
  include /etc/nginx/vhosts-includes/*.conf;

  location /extplorer/ {
    proxy_set_header X-Real-IP  $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header Host $host;
    proxy_pass http://127.0.0.1:8080; // указать номер порта, который слушает Apache
  }
}

And without Nginx , you will probably have to specify the port number in the URL .
For example, http://localhost:8080/extplorer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question