部署laravel 到linux环境
server { listen 80; server_name test.genplahotel.com; index index.html index.htm index.php; root /home/wwwroot/genplahotel/public; location / { try_files $uri $uri/ /index.php?$query_string; # try_files $uri $uri/index.php?$query_string; # if ( $http_user_agent !~* "(Android|iPhone|Windows Phone|UC|Kindle)" ){ # rewrite ^/(.*)$ http://www.net-tactic.com$uri redirect; # } } location ~ .*\.(php|php5|php7)?$ { #fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_pass 127.0.0.1:9001; fastcgi_index index.php; #include fastcgi.conf; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; #fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; include fastcgi_params; #fastcgi_param PHP_VALUE "open_basedir=/home/wwwroot/genplahotel/:/tmp/:/proc/"; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { expires 30d; } location ~ .*\.(js|css)?$ { expires 1h; } #α¾²Ì¬¹æÔò # include /alidata/server/nginx/conf/rewrite/default.conf; access_log /home/wwwlogs/access.log; }
1、
注意点
posted on 2020-04-07 15:41 shenzen_小白 阅读(520) 评论(0) 编辑 收藏 举报