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
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