Install: Added NGINX as an option

This commit is contained in:
Ilya Prokopenko 2021-09-16 17:35:51 +07:00
parent 586aa99cd6
commit f3b7e4a597
No known key found for this signature in database
GPG Key ID: 7736BBBB05F14A56
2 changed files with 53 additions and 2 deletions

View File

@ -1,5 +1,5 @@
You will need the following software for the installation:
* Apache Web Server (2.4 or later)
* Apache Web Server (2.4 or later) or NGINX
* Composer (for setup)
* `ln` program (for setup, comes with GNU Coreutils)
* PHP (7.3 or later)
@ -13,7 +13,7 @@ Also, some plugins may require some additional dependencies from Packagist/NPM,
may need to have Yarn installed to correctly setup dependencies.
Installation steps:
* Download this repo as archive and extract it
* Clone this repo or just download this repo as archive and extract it
* Run `composer install`
* Download plugin, that provides Web App and extract it to `extensions/available`
* Symlink plugin folder from `extensions/available` to `extensions/enabled`
@ -21,3 +21,4 @@ Installation steps:
* * Set root app to your Web App plugin
* * Generate your secret key (Random string, which length is exactly 128 characters)
* Create new VHost and point it's documentroot to `htdocs` folder
* * When using NGINX - use [this configuration file](https://github.com/openvk/chandler/blob/master/install/nginx.conf) as an example.

50
install/nginx.conf Normal file
View File

@ -0,0 +1,50 @@
# nginx.conf file for chandler
#
# this is a example configuration file. adapt the config
# values to your own needs.
#
# the use of tls (e.g., let's encrypt) is recommended.
#
# to install, rename the file name, put it in
# /etc/nginx/sites-available and make a symlink to
# /etc/nginx/sites-enabled
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name domain.tld;
root /opt/chandler/htdocs;
ssl_certificate /path/to/fullchain.pem;
ssl_certificate_key /path/to/privkey.pem;
location / {
index index.php;
try_files $uri $uri/ /index.php;
}
# DO NOT DELETE "(?!well-known).*" if you want to use let's encrypt.
location ~ /\.(?!well-known).* {
deny all;
access_log off;
log_not_found off;
}
location ~ \.php$ {
# include fastcgi.conf;
include fastcgi_params;
# choose one of the above depending on your distribution.
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
# when using a TCP socket, use the following:
# fastcgi_pass 127.0.0.1:9000;
}
}
server {
listen 80;
listen [::]:80;
server_name domain.tld;
return 301 https://$server_name$request_uri;
}