Answer the question
In order to leave comments, you need to log in
Why css files stopped loading after setting up Nginx?
Hello! Such a question: I have a server with Ubuntu Server 16.04, initially I used Apache 2.4 as a web server. I
moved Apache to port 8080, on the 80th port of Nginx as a proxy. For some reason, the CSS files stopped loading.
Nginx config:
server {
listen 80;
server_name *** www.***;
location / {
proxy_pass http://127.0.0.1:8080;
}
location ~* \.(html|jpeg|jpg|gif|png|css|js|pdf|txt|tar|ico)$ {
root /home/***;
expires 60d;
}
}
<VirtualHost *:8080>
AssignUserID *** ***
DirectoryIndex index.php
ServerAdmin [email protected]
DocumentRoot /home/***/panel
ErrorLog /home/***/logs/error.log
CustomLog /home/***/logs/access.log combined
ServerName ***
<Directory "/home/***">
Require all granted
</Directory>
</VirtualHost>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question