## 说明
如果你非常熟悉服务器部署,可以参数以下的配置部署项目。注意,Windows与Linux、MacOS的文件目录符号不一样。Window为"\\",Linux和MacOS为"/"。
<br>
## 目录权限
在linux环境下,要给server/runtime目录和server/public/uploads目录777权限。
<br>
## 服务器配置文件
入口文件:
php入口文件为项目根目录下:likeshop_b2b2c/server/public/index.php
<br>Nginx配置:
```
server {
listen 80;
server_name www.likeshopb2b2c.localhost;
access_log /logs/www.likeshopb2b2c.localhost_access_nginx.log;
error_log /logs/www.likeshopb2b2c.localhost_error_nginx.log;
client_max_body_size 5M;
location / {
root likeshop_b2b2c/server/public;#入口文件目录
index index.html index.htm index.php;
if (!-e $request_filename)
{
rewrite ^/(.*)$ /index.php?s=$1 last;
break;
}
}
location ~ /.*\.php/ {
rewrite ^(.*?/?)(.*\.php)(.*)$ /$2?s=$3 last;
break;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/html;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME likeshop_b2b2c/server/public$fastcgi_script_name; #入口文件目录
include fastcgi_params;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
}
```
<br>或Apache配置
```
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
```