After reinstalling ubuntu nginx config doesn't want to work. try_files
with correct root
path doesn't find files.
Here is my config
server {
listen 80;
listen 443 ssl;
server_name maiden.local evermaiden.local;
root /home/aeonax/lid/evermaiden/resources/public;
access_log /home/aeonax/lid/evermaiden/resources/public/logs/nginx.log mrgl;
location / {
try_files $uri $uri/ @clj;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location @clj {
proxy_pass http://0.0.0.0:4444;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Log format:
log_format mrgl '\n uri: $uri'
'\n document root: $document_root'
'\n realpath root: $realpath_root'
'\n doc + uri: $document_root$uri';
Log output:
uri: /test.jpg
document root: /home/aeonax/lid/evermaiden/resources/public
realpath root: -
doc + uri: /home/aeonax/lid/evermaiden/resources/public/test.jpg
uri: /assets/common.css
document root: /home/aeonax/lid/evermaiden/resources/public
realpath root: -
doc + uri: /home/aeonax/lid/evermaiden/resources/public/assets/common.css
uri: /assets/evermaiden.js
document root: /home/aeonax/lid/evermaiden/resources/public
realpath root: -
doc + uri: /home/aeonax/lid/evermaiden/resources/public/assets/evermaiden.js
What is going wrong here? Nginx have access to the folder(log file work well), all that files exist and store near logs/nginx.log... first request should return image, but it proceed to the server-_- another requests should return assets, but...
I tried to reinstall it with purge nginx nginx-common nginx-full
, I tried other versions (1.12->1.13) but it still doesn't work.