added nginx conf and vhost generation

This commit is contained in:
Bachir Soussi Chiadmi
2018-04-05 23:11:15 +02:00
parent 62493b59db
commit 5a54256c5a
2 changed files with 65 additions and 57 deletions

View File

@@ -1,8 +1,10 @@
server {
listen 80 default_server;
root /var/www/html;
root /var/www/yourdomain.ltd/public_html;
index index.html index.php;
server_name yourdomain.ltd;
charset utf-8;
location / {
@@ -13,7 +15,8 @@ server {
location = /robots.txt { access_log off; log_not_found off; }
access_log on;
error_log /var/log/nginx/error.log error;
# error_log /var/log/nginx/error.log error;
error_log /var/www/yourdomain.ltd/log/error.log;
sendfile off;
@@ -21,7 +24,7 @@ server {
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php:9000;
fastcgi_pass unix:/run/php/php7.0-fpm.sock
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;