为什么nginx通过SSL服务一个子域?

时间:2016-05-08 11:28:09

标签: ssl nginx dns

我是nginx的新手。所以,我知道我需要发布更多信息。抱歉从缺乏信息开始。

我的第一个nginx服务器设置了虚拟域。问题域是在外部域名服务器上设置DNS(A记录)的子域。

当我输入域名时,我会被引导到我服务器的IP,但是,通过https。连接被拒绝。这是我的域名.conf:

    server {
    listen *:80;


    server_name dev.imageweaversmarketing.com ;

    root   /var/www/dev.imageweaversmarketing.com/web;



    index index.html index.htm index.php index.cgi index.pl index.xhtml;

    error_log /var/log/ispconfig/httpd/dev.imageweaversmarketing.com/error.log;
    access_log /var/log/ispconfig/httpd/dev.imageweaversmarketing.com/access.log combined;

    location ~ /\. {
        deny all;
        access_log off;
        log_not_found off;
    }
    location = /favicon.ico {
        log_not_found off;
        access_log off;
    }

    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }

    location /stats/ {

        index index.html index.php;
        auth_basic "Members Only";
        auth_basic_user_file /var/www/clients/client0/web2/web/stats/.htpasswd_stats;
    }

    location ^~ /awstats-icon {
        alias /usr/share/awstats/icon;
    }

    location = /favicon.ico {
        log_not_found off;
        access_log off;
    }

    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }

    location /stats/ {

        index index.html index.php;
        auth_basic "Members Only";
        auth_basic_user_file /var/www/clients/client0/web2/web/stats/.htpasswd_stats;
    }

    location ^~ /awstats-icon {
        alias /usr/share/awstats/icon;
    }
    location ~ \.php$ {
        try_files /cdb8ed7968b49bb25b7be537a21b99cb.htm @php;
    }

    location @php {
        try_files $uri =404;
        include /etc/nginx/fastcgi_params;
        fastcgi_pass unix:/var/lib/php5-fpm/web2.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_intercept_errors on;
    }

 }

有人可以帮忙吗?

修改 我现在至少得到回复。但是,这是一个500错误。 这是teh error.log尾部的结果

2016/05/09 21:12:35 [error] 4847#0: *24 rewrite or internal redirection cycle while internally redirecting to "/error/404.html", client: 184.35.8.90, server: dev.imageweaversmarketing.com, request: "GET /favicon.ico HTTP/1.1", host: "dev.imageweaversmarketing.com", referrer: "http://dev.imageweaversmarketing.com/"

0 个答案:

没有答案