Search found 1 match
- 05 Jun 2019, 16:23
- Forum: Help
- Topic: How can I run by entering only domain.name without :8000!!!!
- Replies: 2
- Views: 1540
Access my web site without the port in the url?
server {
listen 80;
server_name url.com.br;
access_log /var/log/nginx/log/url.com.br.access.log main;
error_log /var/log/nginx/log/url.com.br.error.log;
root /usr/share/nginx/html;
index index.html index.htm;
You should use Nginx as a reverse proxy for your server, Here is a sample configuration for Nginx that may do what you want:
location / {
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
listen 80;
server_name url.com.br;
access_log /var/log/nginx/log/url.com.br.access.log main;
error_log /var/log/nginx/log/url.com.br.error.log;
root /usr/share/nginx/html;
index index.html index.htm;
You should use Nginx as a reverse proxy for your server, Here is a sample configuration for Nginx that may do what you want:
location / {
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}