laravel 配置站点域名

访问一直报404错误

laravel端:

default.conf

server {
        listen       80;
        server_name  api.xxxx.com;
        index index.html index.htm index.php;
        root /alidata/www/default/public;
        
        location / {
                     try_files $uri $uri/ /index.php?$query_string;
        }

        location ~ .*\.(php|php5)?$
        {
            #fastcgi_pass  unix:/tmp/php-cgi.sock;
            fastcgi_pass  127.0.0.1:9000;
            fastcgi_index index.php;
            include fastcgi.conf;
        }


        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires 30d;
        }


        location ~ .*\.(js|css)?$
        {
            expires 1h;
        }
        
        include /alidata/server/nginx/conf/rewrite/default.conf;
        access_log  /alidata/log/nginx/access/default.log;
}

 

web端:

website.conf

server {
        listen       80;
        server_name  www.xxxx.com;
        index index.html index.htm;
        root /alidata/www/web;
    
       location / {
            root /alidata/www/web;
            index index.html index.htm;
        }
        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
       {
           expires 30d;
       }
       location ~ .*\.(js|css)?$
      {
            expires 1h;
       }
    
       #include /alidata/server/nginx/conf/rewrite/default.conf;
       access_log  /alidata/log/nginx/access/website.log;
}

 

https-website.conf:

server {
        listen        443;
        server_name   www.xxx.com;
        ssl on;
        index index.html index.htm;
        root /alidata/www/web;
        ssl_certificate   /alidata/server/nginx/conf/cert/214463173180944.pem;
            ssl_certificate_key  /alidata/server/nginx/conf/cert/214463173180944.key;
            ssl_session_timeout 5m;
            ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
            ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
            ssl_prefer_server_ciphers on;
        location / {
                root /alidata/www/web;
            index index.html index.htm;
            }
        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires 30d;
        }
        location ~ .*\.(js|css)?$
        {
            expires 1h;
        }
        
        #include /alidata/server/nginx/conf/rewrite/default.conf;
        access_log  /alidata/log/nginx/access/default.log;
}

https-default.conf:

server {
            listen       443;
            server_name  api.ecaidata.com  superman.ecaidata.com   ;
            ssl on;
            index index.html index.htm index.php;
            root /alidata/www/default/public;
            ssl_certificate   /alidata/server/nginx/conf/cert/214463173180944.pem;
                ssl_certificate_key  /alidata/server/nginx/conf/cert/214463173180944.key;
                ssl_session_timeout 5m;
                ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
                ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
                ssl_prefer_server_ciphers on;
            location / {
                    try_files $uri $uri/ /index.php?$query_string;
                }
            location ~ .*\.(php|php5)?$
            {
                #fastcgi_pass  unix:/tmp/php-cgi.sock;
                fastcgi_pass  127.0.0.1:9000;
                fastcgi_index index.php;
                include fastcgi.conf;
            }
            location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
            {
                expires 30d;
            }
            location ~ .*\.(js|css)?$
            {
                expires 1h;
            }
            
            include /alidata/server/nginx/conf/rewrite/default.conf;
            access_log  /alidata/log/nginx/access/default.log;
}

 

posted @ 2018-01-23 13:02  smile001  阅读(3327)  评论(0编辑  收藏  举报