V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  jtnetcc  ›  全部回复第 1 页 / 共 1 页
回复总数  15
2019-05-12 21:35:56 +08:00
回复了 jtnetcc 创建的主题 NGINX NGINX 做了反代隐藏不了端口什么原因?
@xiri 好了 谢谢 我屏蔽了正常了,精准匹配不会弄啊。
2019-05-12 21:18:18 +08:00
回复了 jtnetcc 创建的主题 NGINX NGINX 做了反代隐藏不了端口什么原因?
@tangrwx 对的 就是 css js 没加载成功。
2019-05-12 21:17:48 +08:00
回复了 jtnetcc 创建的主题 NGINX NGINX 做了反代隐藏不了端口什么原因?
@liuzuo 应该怎么写?
2019-05-12 21:17:05 +08:00
回复了 jtnetcc 创建的主题 NGINX NGINX 做了反代隐藏不了端口什么原因?
@just1 重启过了 这个排除
2019-05-12 20:37:06 +08:00
回复了 jtnetcc 创建的主题 NGINX NGINX 做了反代隐藏不了端口什么原因?
@Liang 还有个默认的 nginx.conf 文件,是不是需要修改点什么?
2019-05-12 20:34:38 +08:00
回复了 jtnetcc 创建的主题 NGINX NGINX 做了反代隐藏不了端口什么原因?
F12 查看了下,反代没起作用,走的 80 端口

Request URL: http://10.0531.tw/

Request Method: GET

Status Code: 200 OK

Remote Address: 35.201.165.176:80

Referrer Policy: no-referrer-when-downgrade

@Liang
2019-05-12 03:31:19 +08:00
回复了 jtnetcc 创建的主题 NGINX 请教下 nginx 配置域名反代到本地端口这里面应该怎么加。
@autogen 你看看 www.mzd.tw 这个 再看看我的 0531 的代码,路径是一样的 ,只是环境不一样,她是宝塔,我是 oneinstck
2019-05-12 03:26:19 +08:00
回复了 jtnetcc 创建的主题 NGINX 请教下 nginx 配置域名反代到本地端口这里面应该怎么加。
@autogen
不不不。
root /data/wwwroot/1。31.tw;这个你看到的是我删除了两个数字
配置里现在是 root /data/wwwroot/1.0531。tw;
2019-05-12 02:48:37 +08:00
回复了 jtnetcc 创建的主题 NGINX 请教下 nginx 配置域名反代到本地端口这里面应该怎么加。
@MonoLogueChi
@KasuganoSoras
@jpengwu
@zhengjian

我已经败了。
域名 1.0531.tw 现在 ssl 没强制跳转,打算不用宝塔研究下这个项目,https://github.com/Hackxiaoya/CuteOne 宝塔正常,oneinstack 就不行。愁死了。
2019-05-12 01:41:58 +08:00
回复了 jtnetcc 创建的主题 NGINX 请教下 nginx 配置域名反代到本地端口这里面应该怎么加。
@testsec 貌似看不明白啊。
2017-12-19 00:52:05 +08:00
回复了 jtnetcc 创建的主题 SSL 请教下,关于服务器架设多站点的问题。
@Love4Taylor 好的 谢谢,之前我没注意,现在百度直接在同一服务器上形成外链了。。也是醉了。
2017-12-19 00:31:35 +08:00
回复了 jtnetcc 创建的主题 SSL 请教下,关于服务器架设多站点的问题。
@Love4Taylor 亲是在未开启 ssl 的配置里面? 相当于做个 404?
2017-12-19 00:16:24 +08:00
回复了 jtnetcc 创建的主题 SSL 请教下,关于服务器架设多站点的问题。
@Tink 感觉这个没什么问题吧?
2017-12-18 23:40:35 +08:00
回复了 jtnetcc 创建的主题 SSL 请教下,关于服务器架设多站点的问题。
@Tink 在最后一个 ssl 下面 server_name xxxorg; 应该是这个吧
2017-12-18 23:28:06 +08:00
回复了 jtnetcc 创建的主题 SSL 请教下,关于服务器架设多站点的问题。
@Tink

lnmp 用的 oneinstack 一键脚本。。下面是未开启 ssl 和开启 ssl 的配置。

未开启 ssl 站点配置

server {
listen 80;
server_name i.xxx.top;
access_log /data/wwwlogs/i.xxx.top_nginx.log combined;
index index.html index.htm index.php;
root /data/wwwroot/i.xxx.top;

include /usr/local/nginx/conf/rewrite/none.conf;
#error_page 404 /404.html;
#error_page 502 /502.html;
location ~ .*\.(wma|wmv|asf|mp3|mmf|zip|rar|jpg|gif|png|swf|flv|mp4)$ {
valid_referers none blocked *.xxx.top i.xxx.top;
if ($invalid_referer) {
rewrite ^/ http://www.linuxeye.com/403.html;
return 403;
}
}
location ~ [^/]\.php(/|$) {
#fastcgi_pass remote_php_ip:9000;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
}

location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
expires 30d;
access_log off;
}
location ~ .*\.(js|css)?$ {
expires 7d;
access_log off;
}
location ~ /\.ht {
deny all;
}
}

开启 ssl 站点配置

server {
listen 80;
listen 443 ssl http2;
ssl_certificate /usr/local/nginx/conf/ssl/xxx.org.crt;
ssl_certificate_key /usr/local/nginx/conf/ssl/xxx.org.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_prefer_server_ciphers on;
ssl_session_timeout 10m;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_buffer_size 1400;
add_header Strict-Transport-Security max-age=15768000;
ssl_stapling on;
ssl_stapling_verify on;
server_name xxx.org;
access_log /data/wwwlogs/xxxi.org_nginx.log combined;
index index.html index.htm index.php;
root /data/wwwroot/xxx.org;
if ($ssl_protocol = "") { return 301 https://$host$request_uri; }

include /usr/local/nginx/conf/rewrite/none.conf;
#error_page 404 /404.html;
#error_page 502 /502.html;
location ~ .*\.(wma|wmv|asf|mp3|mmf|zip|rar|jpg|gif|png|swf|flv|mp4)$ {
valid_referers none blocked *.xxx.org xxx.org;
if ($invalid_referer) {
rewrite ^/ http://www.linuxeye.com/403.html;
return 403;
}
}
location ~ [^/]\.php(/|$) {
#fastcgi_pass remote_php_ip:9000;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
}

location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
expires 30d;
access_log off;
}
location ~ .*\.(js|css)?$ {
expires 7d;
access_log off;
}
location ~ /\.ht {
deny all;
}
}
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2638 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 16ms · UTC 10:58 · PVG 18:58 · LAX 03:58 · JFK 06:58
Developed with CodeLauncher
♥ Do have faith in what you're doing.