i have NGINX running proxies for all my usenet programs that all link to organizr
https://github.com/causefx/Organizr
which works great.
i also have Phlex set up which links your google home to Plex and Sonarr/Radarr
https://github.com/d8ahazard/Phlex
for this to work it needs its own server port. i've been unsuccessful in adding it to my NGINX set up and had to install xampp apache (it runs on port 72).
I would really like not to run both apache and NGINX (i did switch everything to apache yet found it loaded my proxies slower than NGINX). how can i add another server for port 72 and have it load the PHP correctly?
I have port 80 and 443 linked to mydomain.com and i would like to link port 72 to phlex.mydomain.com
here is my current set up
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
server {
listen 80;
server_name _;
rewrite ^ https://$host$request_uri? permanent;
}
server {
listen 443 ssl;
server_name mydomain.com, 192.168.0.21;
ssl_certificate mydomain.crt;
ssl_certificate_key mydomain.key;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_dhparam dhparam.pem;
location /{
root html;
index index.php
auth_basic "closed site";
auth_basic_user_file .htpasswd;
}
location /plexemail {
root C:\Plexemail\web;
}
location /server {
proxy_pass http://192.168.0.35:21;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /web {
proxy_pass http://127.0.0.1:32400;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /nzbget {
proxy_pass http://192.168.0.21:6789;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /plexpy {
proxy_pass http://127.0.0.1:8181/plexpy;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
auth_basic "closed site";
auth_basic_user_file .htpasswd;
}
location /mylar {
proxy_pass http://127.0.0.1:8090;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
auth_basic "closed site";
auth_basic_user_file .htpasswd;
}
location /htpc {
proxy_pass http://127.0.0.1:8085;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
auth_basic "closed site";
auth_basic_user_file .htpasswd;
}
location /nzbhydra {
proxy_pass http://127.0.0.1:5075;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /sonarr {
proxy_pass http://127.0.0.1:8989;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
auth_basic "closed site";
auth_basic_user_file .htpasswd;
}
location /radarr {
proxy_pass http://127.0.0.1:7878;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
auth_basic "closed site";
auth_basic_user_file .htpasswd;
}
location /deluge {
proxy_pass http://127.0.0.1:7741/;
proxy_set_header X-Deluge-Base "/deluge/";
auth_basic "closed site";
auth_basic_user_file .htpasswd;
}
location /plexrequest{
proxy_pass http://127.0.0.1:3579;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /comics/admin {
proxy_pass http://localhost:2203/comics/admin;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
auth_basic "closed site";
auth_basic_user_file .htpasswd;
}
location /comics {
proxy_pass http://192.168.0.21:2202;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
auth_basic "closed site";
auth_basic_user_file .htpasswd;
}
location /calendar{
proxy_pass http://192.168.0.21:8989/sonarr/feed/calendar/NzbDrone.ics?
apikey=ec4166d11c2e40baac11df7b483fa956;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ .php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME C:/nginx-1.8.0/html/$fastcgi_script_name;
include fastcgi_params;
}
}
}