54 lines
1.1 KiB
Nginx Configuration File
54 lines
1.1 KiB
Nginx Configuration File
worker_processes 1;
|
|
error_log __ROOT__/error.log;
|
|
pid __ROOT__/server.pid;
|
|
daemon off;
|
|
|
|
|
|
events {
|
|
worker_connections 4096;
|
|
}
|
|
|
|
|
|
http {
|
|
include __ROOT__/mime.types;
|
|
|
|
default_type application/octet-stream;
|
|
log_format main '$remote_addr - $remote_user [$time_local] $status '
|
|
'"$request" $body_bytes_sent "$http_referer" '
|
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
autoindex on;
|
|
|
|
server {
|
|
listen __HTTP_PORT__;
|
|
server_name localhost;
|
|
access_log access.log main;
|
|
root __ROOT__/html;
|
|
|
|
location / {
|
|
index index.html index.txt index.php;
|
|
rewrite (.*) /app/webroot$1 last;
|
|
rewrite ^$ /app/webroot last;
|
|
}
|
|
|
|
location /app/webroot {
|
|
index index.html index.txt index.php;
|
|
}
|
|
|
|
location ~ \.php$ {
|
|
include fastcgi_params;
|
|
fastcgi_pass 127.0.0.1:__PHP_FCGI_PORT__;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
# <IfModule mod_rewrite.c>
|
|
# RewriteEngine on
|
|
# RewriteRule ^$ app/webroot/ [L]
|
|
# RewriteRule (.*) app/webroot/$1 [L]
|
|
# </IfModule>
|
|
|
|
|
|
# vim:filetype=nginx |