ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
## 说明 如果你非常熟悉服务器部署,可以参考以下的配置部署项目。注意,Windows与Linux、MacOS的文件目录符号不一样。Window为"\\",Linux和MacOS为"/"。 <br> ## 目录权限 在linux环境下,要给server/runtime目录和server/public/uploads目录777权限。 <br> ## 服务器配置文件 入口文件: php入口文件为项目根目录下:likeshopv2/server/public/index.php <br>Nginx配置: ``` server { listen 80; server_name www.likeshop.localhost; access_log /logs/www.likeshop.localhost_access_nginx.log; error_log /logs/www.likeshop.localhost_error_nginx.log; client_max_body_size 5M; location / { root likeshopv2/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 likeshopv2/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> ```