PHP微服务初始化框架
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

77 lines
2.0 KiB

# saltfish_raw_php.private.conf
# saltfish_raw_php nginx private config.
# This is a [private] api. It means nginx listen on port 8000.
# @version 171017:1
# @author karminski <code.karminski@outlook.com>
# server config
server {
listen 8000;
server_name saltfish-raw-php.juejin.im;
# origin sessings
include /data/apps/nginx/conf/origin/gold.xitu.io_and_juejin.im.conf;
root /data/repo/saltfish_raw_php/src/;
access_log /data/repo/saltfish_raw_php/logs/saltfish_raw_php.private.access.log logstash;
error_log /data/repo/saltfish_raw_php/logs/saltfish_raw_php.private.error.log;
client_body_temp_path /data/tmp/nginx/client_body_temp/ 1 2;
proxy_temp_path /data/tmp/nginx/proxy_temp/ 1 2;
fastcgi_temp_path /data/tmp/nginx/fastcgi_temp/ 1 2;
rewrite "^(.*)/v1/sample$" $1/SampleApi.php?$query_string last;
rewrite "^(.*)/status$" $1/status.php last;
rewrite "^(.*)/server_env$" $1/server_env.php last;
if ($request_uri ~ " ") {
return 444;
}
location / {
}
location = /ENV {
allow 127.0.0.1;
deny all;
}
location ~* ^/DOCUMENTS{
return 404;
}
location ~* ^/protected{
return 404;
}
location ~* ^/test{
return 404;
}
location ~* ^/logs{
return 404;
}
location ~* ^/conf{
return 404;
}
location = /favicon.ico {
allow all;
log_not_found off;
access_log off;
}
location ~* ^/not_found{
return 404;
}
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
location ~ \.php$ {
if ( $fastcgi_script_name ~ \..*\/.*php ) {
return 403;
}
include fastcgi.conf;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
}
}