What's new

Help in nginx configuration

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Jokerigno

New Around Here
Hi all,

I'm new of the community but I used your support a lot in the past.

I installed Asus Merlin firmware in my R7000 Netgear to enhance his potential.

I want to use use nginx as reverse proxy in order to route connection to different subdomains behind my home router.

Below you will find my nginx.conf setup but it doesn't work.

Where is the issue?


user nobody nobody ;
worker_processes 1;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

server_names_hash_bucket_size 64;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

#gzip on;

#HTTP default website
server {
listen 80;
server_name localhost;

location / {
root html;
index index.html index.htm;
}

error_page 404 /404.html;

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}

#HTTP reverse proxies
#server {
# listen 80;
# server_name www.mydomain.com;
# location / {
# # A backend apache server
# proxy_pass http://192.168.1.4;
# proxy_set_header Host $host;
# proxy_set_header X-Forwarded-For $remote_addr;
# }
#}

server {
listen 80;
server_name plex.xxxxxxxxxxxxx.it;
if ($request_uri !~ "^/web/.*")
{
return 301 http://$host/web/index.html;
}
location / {
# Plex Web
proxy_pass http://192.168.2.xxx:32400;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
}

server {
listen 80;
server_name joshua.xxxxxxxxxxxx.it;
location / {
# Synology NAS
proxy_pass http://192.168.2.xxxxx;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
}

server {
listen 80;
server_name jarvis.xxxxxxxxccccx.it;
location / {
# Raspberry Pi 3.
proxy_pass http://192.168.2.xxxx:xxxxx;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
}

# HTTP to HTTPS redirects
#server {
# listen 80;
# # Force SSL for Owncloud
# server_name owncloud.mydomain.com;
# return 301 https://$host;
#}

# HTTPS default website
#server {
# listen 443;
# server_name localhost;
# ssl on;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_timeout 5m;
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}

# HTTPS reverse proxies
#server {
# listen 443;
# server_name owncloud.mydomain.com;
# ssl on;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_timeout 5m;
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# # Owncloud
# proxy_pass http://192.168.1.7;
# proxy_set_header Host $host;
# proxy_set_header X-Forwarded-For $remote_addr;
# }
}

Thank you
 
Supported router is ASUS:

RT-N66U
RT-AC66U
RT-AC66U_B1 (use the RT-AC68U firmware)
RT-AC56U
RT-AC68U/RT-AC68P/RT-AC68UF/RT-AC1900/RT-AC1900P (same firmware)
RT-AC87U
RT-AC88U
RT-AC3100
RT-AC3200
RT-AC5300
 
Supported router is ASUS:

RT-N66U
RT-AC66U
RT-AC66U_B1 (use the RT-AC68U firmware)
RT-AC56U
RT-AC68U/RT-AC68P/RT-AC68UF/RT-AC1900/RT-AC1900P (same firmware)
RT-AC87U
RT-AC88U
RT-AC3100
RT-AC3200
RT-AC5300
I have an Asus firmware. I can't ask for support?

Inviato dal mio A0001 utilizzando Tapatalk
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Members online

Top