server {
listen 80;
server_name www.aaa.com;
charset utf-8;
root /webroot/host1/public/;
index index.htm index.html;
# for vue
location / {
try_files $uri $uri/ /index.html;
}
# for php
location ~ \.php$ {
root /webroot/host1/public/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
include /opt/gitlab/embedded/conf/fastcgi_params;
}
# api重点
location ~ ^/api/ {
if (!-e $request_filename) {
rewrite ^/api/(.*)$ /index.php?s=/$1 last;
}
}
access_log /var/log/gitlab/nginx/access.log;
error_log /var/log/gitlab/nginx/error.log;
client_max_body_size 8m;
}
发表评论