1. Set/ete/hosts:
Bind the domain name you want to access to a local port
This will ensure that we can redirect to the local domain when we log in.
127.0.0.1 mobile.ymt360.com
127.0.0.1 my-uc-test.ymt360.com
127.0.0.1 localhost
255.255.255.255 Broadcasthost
:: 1 localhost
~
2, Nginx configuration + start.
Installation Nginx is not detailed, the main configuration (domain name reference to the corresponding file directory)
1. Configure the server
server {
Listen 80;
server_name mobile.ymt360.com;
Index index.php;
Root/data/www/website/mobile/public;
Access_log/data/nginxlogs/mobile.ymt360.com.log;
Error_log/data/nginxlogs/mobile.ymt360.com.error;
Client_max_body_size 12m;
Error_page 502/502.html;
Location/{
Index index.php;
if (!-e $request _filename) {
Rewrite ^/(. +) $/index.php/$1 last;
}
}
Location ~ ^/index\.php {
Set $path _info "";
Set $real _script_name $fastcgi _script_name;
if ($fastcgi _script_name ~ "^ (. +?\.php) (/.+) $") {
Set $real _script_name $;
Set $path _info;
}
CharSet Utf-8;
Fastcgi_param path_info $path _info;
Include fastcgi.conf;
}
Location ~. *\.php$ {
Deny all;
}
}
PHP-FASTCGI Configuration
Here the path with 9000 ports
Mac Nginx+ci, Lumen and other Web development environment configuration