I have 2 links: myserver.org and myserver.org/support I need first link follow to /var/www/myserver.org and second to /var/www/support My config now: first file & link
server { listen 80 default_server; server_name groupmanager.org; charset utf-8; root /var/www/groupmanager.org; index index.php; location / { try_files $uri $uri/ /index.php?$query_string; } access_log /var/log/nginx/groupmanager.org_access.log; error_log /var/log/nginx/groupmanager.org_error.log; include /etc/nginx/templates/php-fpm.conf; } server { listen 80; server_name www.groupmanager.org; rewrite ^(.*) http://groupmanager.org$1 permanent; } Second file & link:
server { listen 80; server_name 163.172.88.31/support; charset utf-8; root /var/www/support; index index.php; access_log /var/log/nginx/support_access.log; error_log /var/log/nginx/support_error.log; include /etc/nginx/templates/php-fpm.conf; } server { listen 80; server_name www.163.172.88.31/support; rewrite ^(.*) http://163.172.88.31/support$1 permanent; } php-fpm.conf
location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } location ~ /\.ht { deny all; } location ~* \.(gif|jpeg|jpg|txt|png|tif|tiff|ico|jng|bmp|doc|pdf|rtf|xls|ppt|rar|rpm|swf|zip|bin|exe|dll|deb|cur)$ { expires 168h; } location ~* \.(css|js)$ { expires 180m; } First link works fine, second - no. I see '403 Forbidden' What is not rigth? Permissions for folders are the same, I think, they are right.