diff --git a/assets/nginx.conf b/assets/nginx.conf index 7c36ab0..426b20b 100644 --- a/assets/nginx.conf +++ b/assets/nginx.conf @@ -1,5 +1,5 @@ server { - listen 80 default_server; + listen 80; root /var/www/yourdomain.ltd/public_html; index index.html index.php; @@ -15,7 +15,6 @@ 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/www/yourdomain.ltd/log/error.log; sendfile off; @@ -24,7 +23,7 @@ server { location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/run/php/php7.0-fpm.sock + 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; diff --git a/install-debian-server.sh b/install-debian-server.sh index 93b46b9..59b5800 100755 --- a/install-debian-server.sh +++ b/install-debian-server.sh @@ -379,7 +379,6 @@ if [ "$lemp" = "y" ]; then echo "\033[35;1mInstalling Redis \033[0m" sleep 3 apt-get --yes --force-yes install redis-server php-redis - # cp "$_cwd"/assets/nginx.conf /etc/nginx/conf.d/ systemctl enable redis-server systemctl restart redis-server @@ -418,16 +417,16 @@ if [ "$lemp" = "y" ]; then sed -ir "s/yourdomain\.ltd/$_host_name/g" /etc/nginx/sites-available/"$_host_name".conf mkdir -p /var/www/"$_host_name"/public_html - mkdir /srv/www/"$_host_name"/logs + mkdir /var/www/"$_host_name"/logs #set proper right to user will handle the app - chown -R root:admin /srv/www/"$_host_name"/ - chmod -R g+w /srv/www/"$_host_name"/ - chmod -R g+r /srv/www/"$_host_name"/ + chown -R root:admin /var/www/"$_host_name"/ + chmod -R g+w /var/www/"$_host_name"/ + chmod -R g+r /var/www/"$_host_name"/ # create a shortcut to the site mkdir /home/"$user"/www/ chown "$user":admin /home/"$user"/www/ - ln -s /srv/www/"$_host_name" /home/"$user"/www/"$_host_name" + ln -s /var/www/"$_host_name" /home/"$user"/www/"$_host_name" # activate the vhost # a2ensite "$_host_name".conf