Answer the question
In order to leave comments, you need to log in
I don’t understand a little how to remove ports in a link with nginx?
I'm trying to go to latine.site but I have the main apache page there. I already stopped apache, but nothing helps.
I'm in /etc/nginx/sites-available/latina
server {
listen 81;
root /home/ruslan/Разработка/latina;
index index.html index.htm index.php;
server_name latina.site;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
}
location / {
try_files $uri $uri/ =404;
proxy_pass http://127.0.0.1:81;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
127.0.0.1 localhost
127.0.1.1 debian
127.0.0.1 latina.site
Answer the question
In order to leave comments, you need to log in
Is Apache needed at all? You can completely demolish it sudo apt purge apache2
In /etc/nginx/sites-available/latina should be listen 80;
server_name latina.site; replace with server_name latina.site www.latina.site; - sometimes browsers can be quite stubborn.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question