Всем привет. Имею такой nginx конфиг:
upstream etherpad-lite {
server 127.0.0.1:9001;
}
error_page 500 https://noname.com/controller?etherpad=500;
error_page 502 https://noname.com/controller?etherpad=502;
error_page 503 https://noname.com/controller?etherpad=503;
error_page 504 https://noname.com/controller?etherpad=504;
server {
listen 443 ssl;
server_name noname.xyz;
access_log /var/log/virtualmin/noname.xyz_access_log;
error_log /var/log/virtualmin/noname.xyz_error_log;
ssl_certificate /home/noname/ssl.combined;
ssl_certificate_key /home/noname/ssl.key;
if ($host !~* "^noname\.xyz$") {
return 444;
}
if ($request_uri = "/") {
return 444;
}
location /p/ {
rewrite ^/p/(.*) /$1 permanent;
}
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
location ~ ^/(locales/|locales.json|admin/|static/|pluginfw/|javascripts/|socket.io/|ep/|minified/|api/|ro/|error/|jserror/|favicon.ico|robots.txt) {
proxy_pass http://etherpad-lite;
}
location / {
proxy_pass http://etherpad-lite/p/;
proxy_redirect / /p/;
}
}
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/php-nginx/155629820914603.sock/socket;
}