-
Notifications
You must be signed in to change notification settings - Fork 12
05 Webserver Configuration
Sean Vreeland edited this page Jan 1, 2020
·
10 revisions
Last edited 31 DEC 2019 by @seanvree
- NOTE: "
alias
" should be set to the root path of the Logarr repo on the webserver's filesystem. - NOTE: The example below is set for PHP 7.0, if other versions of PHP are installed ( 7.1 or 7.2 ), make sure to update the version in the
fastcgi_pass
section below.
location /logarr {
alias /var/www/apps/logarr/;
location ~ \.php$ {
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
include snippets/fastcgi-php.conf;
fastcgi_param SCRIPT_FILENAME $request_filename;
include fastcgi_params;
}
}
location /logarr {
proxy_pass http://10.0.0.11:4078/logarr;
add_header X-Frame-Options SAMEORIGIN;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
- NGINX and PHP are installed on the webserver. If not, follow the below guide to install NGINX and/or PHP:
https://docs.organizr.app/books/installation/page/windows#bkmrk-manual-install
-
PHP is installed to
C:\nginx\php\
-
PHP daemon is listening on 127.0.0.1:9000
-
The Logarr root directory path is:
c:\nginx\www\logarr\
(The main Logarr index file should reside at:c:\nginx\www\logarr\index.php
) -
The NGINX Block will look like this:
location /logarr {
root c:/nginx/www;
autoindex on;
index index.php;
location ~ .php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
}
}
- Add the following to the caddyfile:
templates {
ext .php
}
- Browse to
[logarr repo]/assets/php/phpinfo.php
- The browser output should look like this: