Hiddify-Manager icon indicating copy to clipboard operation
Hiddify-Manager copied to clipboard

nginx failed cant open site

Open Jokerpym opened this issue 3 years ago • 22 comments

Jokerpym avatar Jan 08 '23 04:01 Jokerpym

I have the same problem. because Xray service and Nginx service both want to listen on port 80.

My status: hiddify-admin active gost inactive hiddify_monitoring_web active ss-faketls active ss-v2ray active mtproxy active trojan-go active v2ray active netdata inactive nginx failed xray active

parsaahaniii avatar Jan 08 '23 08:01 parsaahaniii

so what we can do?

cloner93 avatar Jan 08 '23 08:01 cloner93

would you please send me

systemctl status nginx

hiddify-com avatar Jan 08 '23 09:01 hiddify-com

● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sun 2023-01-08 01:08:15 +0330; 11h ago Docs: man:nginx(8) Process: 34743 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Process: 34744 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)

Jan 08 01:08:12 your-vps.kharche nginx[34744]: nginx: [warn] duplicate MIME type "text/html" in /opt/hiddify-config/nginx/common.conf:102 Jan 08 01:08:12 your-vps.kharche nginx[34744]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Jan 08 01:08:13 your-vps.kharche nginx[34744]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Jan 08 01:08:13 your-vps.kharche nginx[34744]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Jan 08 01:08:14 your-vps.kharche nginx[34744]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Jan 08 01:08:14 your-vps.kharche nginx[34744]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Jan 08 01:08:15 your-vps.kharche nginx[34744]: nginx: [emerg] still could not bind() Jan 08 01:08:15 your-vps.kharche systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE Jan 08 01:08:15 your-vps.kharche systemd[1]: nginx.service: Failed with result 'exit-code'. Jan 08 01:08:15 your-vps.kharche systemd[1]: Failed to start A high performance web server and a reverse proxy server.

parsaahaniii avatar Jan 08 '23 09:01 parsaahaniii

Xray service is listening on port 80.

parsaahaniii avatar Jan 08 '23 09:01 parsaahaniii

× nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sun 2023-01-08 12:32:15 +0330; 2s ago Docs: man:nginx(8) Process: 2529 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE) CPU: 7ms

Jan 08 12:32:15 105957.vps.hostiko.network systemd[1]: Starting A high performance web server and a reverse proxy server... Jan 08 12:32:15 105957.vps.hostiko.network nginx[2529]: nginx: [emerg] invalid number of arguments in "sub_filter" directive in /opt/hiddify-config/nginx/replace.conf:1 Jan 08 12:32:15 105957.vps.hostiko.network nginx[2529]: nginx: configuration file /etc/nginx/nginx.conf test failed Jan 08 12:32:15 105957.vps.hostiko.network systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE Jan 08 12:32:15 105957.vps.hostiko.network systemd[1]: nginx.service: Failed with result 'exit-code'. Jan 08 12:32:15 105957.vps.hostiko.network systemd[1]: Failed to start A high performance web server and a reverse proxy server.

cloner93 avatar Jan 08 '23 09:01 cloner93

would you please give the output of /opt/hiddify-config/nginx/replace.conf

× nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sun 2023-01-08 12:32:15 +0330; 2s ago Docs: man:nginx(8) Process: 2529 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE) CPU: 7ms

Jan 08 12:32:15 105957.vps.hostiko.network systemd[1]: Starting A high performance web server and a reverse proxy server... Jan 08 12:32:15 105957.vps.hostiko.network nginx[2529]: nginx: [emerg] invalid number of arguments in "sub_filter" directive in /opt/hiddify-config/nginx/replace.conf:1 Jan 08 12:32:15 105957.vps.hostiko.network nginx[2529]: nginx: configuration file /etc/nginx/nginx.conf test failed Jan 08 12:32:15 105957.vps.hostiko.network systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE Jan 08 12:32:15 105957.vps.hostiko.network systemd[1]: nginx.service: Failed with result 'exit-code'. Jan 08 12:32:15 105957.vps.hostiko.network systemd[1]: Failed to start A high performance web server and a reverse proxy server.

hiddify-com avatar Jan 08 '23 09:01 hiddify-com

would you please give the output of /opt/hiddify-config/nginx/replace.conf

× nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sun 2023-01-08 12:32:15 +0330; 2s ago Docs: man:nginx(8) Process: 2529 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE) CPU: 7ms Jan 08 12:32:15 105957.vps.hostiko.network systemd[1]: Starting A high performance web server and a reverse proxy server... Jan 08 12:32:15 105957.vps.hostiko.network nginx[2529]: nginx: [emerg] invalid number of arguments in "sub_filter" directive in /opt/hiddify-config/nginx/replace.conf:1 Jan 08 12:32:15 105957.vps.hostiko.network nginx[2529]: nginx: configuration file /etc/nginx/nginx.conf test failed Jan 08 12:32:15 105957.vps.hostiko.network systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE Jan 08 12:32:15 105957.vps.hostiko.network systemd[1]: nginx.service: Failed with result 'exit-code'. Jan 08 12:32:15 105957.vps.hostiko.network systemd[1]: Failed to start A high performance web server and a reverse proxy server.

sub_filter usersecret fc40e1031e0b831a7076e7dea3680af0; sub_filter userguidsecret fc40e103-1e0b-831a-7076-e7dea3680af0; sub_filter serverip SERVER_IP; sub_filter proxyproviderip $host; sub_filter cloudprovider DOMAIN_NAME; sub_filter %%HEX_TELEGRAM_DOMAIN%% 6d61696c2e676f6f676c652e636f6d; sub_filter "host: www.google.com" "host: www.google.com";root@your-vps:~#

parsaahaniii avatar Jan 08 '23 09:01 parsaahaniii

@parsaahaniii i want replace.conf from @cloner93 because he has problem in that file however for you i don't know exactly what is the situation have you enabled enable http proxy?

hiddify-com avatar Jan 08 '23 09:01 hiddify-com

sub_filter userguidsecret ----; sub_filter serverip ip; sub_filter proxyproviderip $host; sub_filter cloudprovider domain; sub_filter %%HEX_TELEGRAM_DOMAIN%% 6d61696c2e676f6f676c652e636f6d; sub_filter "host: www.google.com" "host: www.google.com";

cloner93 avatar Jan 08 '23 09:01 cloner93

you have changed userguidsecret with ---? or this is what exactly in your file?

would you please send message in discord to hiddify#7330 if you have it

hiddify-com avatar Jan 08 '23 09:01 hiddify-com

@parsaahaniii i want replace.conf from @cloner93 because he has problem in that file however for you i don't know exactly what is the situation have you enabled enable http proxy?

I install the "PISHRAFTEH"  guide on a fresh server and I just change the domain and secret in the config. In the end, status was:

hiddify-admin active
gost inactive
hiddify_monitoring_web active
ss-faketls active
ss-v2ray active
mtproxy active
trojan-go active
v2ray active
netdata inactive
nginx failed
xray active

Aftert I debug it I see that x-ray is listening on port 80 and so nginx service cant be up. I guess that my problem is same with @cloner93

parsaahaniii avatar Jan 08 '23 09:01 parsaahaniii

no I chenged ip and domain.

you have changed userguidsecret with ---? or this is what exactly in your file?

would you please send message in discord to hiddify#7330 if you have it

cloner93 avatar Jan 08 '23 09:01 cloner93

@parsaahaniii I think you have enabled HTTP_PROXY, i forgot to commit one of the files. it should be resolved now

hiddify-com avatar Jan 08 '23 09:01 hiddify-com

no I chenged ip and domain.

you have changed userguidsecret with ---? or this is what exactly in your file? would you please send message in discord to hiddify#7330 if you have it

@cloner93 i think there is a problem in USER_SECRET in config.env file would you please remove that link and run install.sh again?

hiddify-com avatar Jan 08 '23 09:01 hiddify-com

@hiddify ok I try it. just tell me, Which link should I delete? in config.env?

cloner93 avatar Jan 08 '23 09:01 cloner93

@cloner93 Sorry for typo i mean line remove the line in config.env containing "USER_SECRET"

hiddify-com avatar Jan 08 '23 09:01 hiddify-com

I think the problems has been fixed in the new version

please don't hesitate to reply if the problem still exist.

hiddify-com avatar Jan 08 '23 09:01 hiddify-com

I restart my server os and install it again and now I don`t have a problem. Thanks a lot

parsaahaniii avatar Jan 08 '23 10:01 parsaahaniii

I did reinstall os and hiddify agian too, but after that status is:

./status.sh hiddify-admin active gost inactive hiddify_monitoring_web inactive ss-faketls active ss-v2ray active mtproxy activating trojan-go failed v2ray failed netdata active nginx failed xray active

cloner93 avatar Jan 08 '23 10:01 cloner93