V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
NGINX
NGINX Trac
3rd Party Modules
Security Advisories
CHANGES
OpenResty
ngx_lua
Tengine
在线学习资源
NGINX 开发从入门到精通
NGINX Modules
ngx_echo
hanjunlei
V2EX  ›  NGINX

nginx 不报错 网站访问不了 什么问题

  •  
  •   hanjunlei · 2018-04-02 17:36:09 +08:00 · 2307 次点击
    这是一个创建于 2431 天前的主题,其中的信息可能已经有所发展或是发生改变。

    用 nginx squid 缓存做 HTTPS nginx 启动正常 没有报错 网站却无法访问

    squid 80 端口代理 http 可以正常访问

    nginx HTTPS 启动正常 却无法访问

    WIN2003 系统 去年做过一个这样的站没问题的 不知道现在什么问题了 求大神。。。

    以下 nginx.conf

    power by www.phpStudy.net

    #user nobody; worker_processes 1;

    #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info;

    #pid logs/nginx.pid;

    events { worker_connections 1024; }

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

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';
    
    #access_log  logs/access.log  main;
    
    sendfile        on;
    #tcp_nopush     on;
    
    #keepalive_timeout  0;
    keepalive_timeout  65;
    #tcp_nodelay on;
    

    fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300; fastcgi_buffer_size 128k; fastcgi_buffers 4 128k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k;

    #gzip on; gzip on; gzip_min_length 1k; gzip_buffers 4 32k; gzip_http_version 1.1; gzip_comp_level 2; gzip_types text/plain application/x-javascript text/css application/xml; gzip_vary on; gzip_disable "MSIE [1-6].";

    server_names_hash_bucket_size 128; client_max_body_size 100m; client_header_buffer_size 256k; large_client_header_buffers 4 256k;

    upstream my_server {
    server 183.2.242.63:80;
    keepalive 2000; } #站点 1------------------------------------------------------------------------------ server { listen 443 ssl; server_name jjj198.com www.jjj198.com; ssl on; ssl_certificate C:/web/ssl/www.jjj198.com.crt; ssl_certificate_key C:/web/ssl/www.jjj198.com.key; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; ssl_prefer_server_ciphers on; location / { proxy_pass http://my_server; proxy_set_header Host $host; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_connect_timeout 60; proxy_read_timeout 600; proxy_send_timeout 600; } } #站点 2------------------------------------------------------------------------------ server { listen 443 ssl; server_name xxx.com www.xxx.com; ssl on; ssl_certificate C:/web/ssl/www.jjj198.com.crt; ssl_certificate_key C:/web/ssl/www.jjj198.com.key; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; ssl_prefer_server_ciphers on; location / { proxy_pass http://my_server; proxy_set_header Host $host; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_connect_timeout 60; proxy_read_timeout 600; proxy_send_timeout 600; } }

    }

    2 条回复    2018-04-03 17:58:15 +08:00
    xubeiyan
        1
    xubeiyan  
       2018-04-03 09:54:15 +08:00
    你把输出日志的那行注释了啊~当然看不到日志了
    ```
    #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
    # '$status $body_bytes_sent "$http_referer" '
    # '"$http_user_agent" "$http_x_forwarded_for"';
    ```
    hanjunlei
        2
    hanjunlei  
    OP
       2018-04-03 17:58:15 +08:00
    关闭防火墙就好了,已经解决!感谢。。。。。。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5313 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 09:24 · PVG 17:24 · LAX 01:24 · JFK 04:24
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.