44 lines
1.1 KiB
Text
44 lines
1.1 KiB
Text
server {
|
|
listen *:8080;
|
|
server_name books.dev.actcur.com;
|
|
|
|
root /usr/share/webapps/lightbooks-dev/public; #Path of lightbooks-dev web directory
|
|
index index.php;
|
|
access_log /var/log/nginx/access.log;
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
location = /favicon.ico {
|
|
log_not_found off;
|
|
access_log off;
|
|
expires max;
|
|
}
|
|
|
|
location ~ /\. {
|
|
deny all;
|
|
access_log off;
|
|
log_not_found off;
|
|
}
|
|
|
|
location ~ \..*/.*\.php$ {
|
|
return 403;
|
|
}
|
|
|
|
if (!-d $request_filename) {
|
|
rewrite ^/(.+)/$ /$1 permanent;
|
|
}
|
|
|
|
location / {
|
|
try_files $1 $uri $uri/ /index.php$is_args$args;
|
|
}
|
|
|
|
location ~ ^/index\.php(.*)$ {
|
|
fastcgi_index index.php;
|
|
include /etc/nginx/fastcgi_params;
|
|
try_files $uri =404;
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; #Replace with the port if php fpm is configured to run on port.
|
|
fastcgi_param SCRIPT_FILENAME /usr/share/webapps/lightbooks-dev/public/index.php; #Replace with lightbooks-dev2 web index.php file path.
|
|
fastcgi_param LIGHTBOOKSWEB_CONFIGDIR /etc/lightbooks-dev;
|
|
fastcgi_param REMOTE_USER $remote_user;
|
|
}
|
|
}
|