Welcome! Log In Create A New Profile

Advanced

Multiple PHP Websites

Posted by mav 
mav
Multiple PHP Websites
March 18, 2014 03:09PM
Hi

I think I need some help configurate nginx properly.
Im running multiple php sites in /usr/share/nginx/www/<subdirectory>, which works well with the nearly default configuration of nginx.

Now I want to make a new subpage with rewrite rules. I tried this configuration in a .conf file.. but it did not work.

# nginx configuration
autoindex off;

location /mysub/ {
if (!-e $request_filename) {
rewrite ^/mysub/(.+)$ /mysub/index.php?url=$1 break;
}
}

Thanks for your help.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 100
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready