增加配置
nginx
server {
listen 80;
server_name changning.dev.pingansec.com;
index index.html index.htm index.php;
root /Users/www/web-php/app-changning;#注意~~~~~
rewrite . /index.php;
location ~ .*\.(php|php5)?$ {
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
apache
<VirtualHost *:80>
DocumentRoot e:/wamp/www/web-php/app-finance
ServerName changning.dev.pingansec.com
ServerAlias *.finance.dev.pingansec.com
<Location />
AddDefaultCharset utf-8
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L,QSA]
</Location>
</VirtualHost>