I'm using perusio configuration for drupal but I think that is only designed for single web site. php does not work in subfolders.
I want to create a structure as follows:
Main site
- /var/www/domain.com/master/src/
Sub-sites
- /usr/local/subsites/_site1/src/
- /usr/local/subsites/_site2/src/
- /usr/local/subsites/_site3/src/
I want to access the sub-sites as follows:
domain.com/site1
domain.com/site2
domain.com/site3
Is there any nginx configuration for that?
I would like to add 3 subfolders to the following configuration.
# -*- mode: nginx; mode: flyspell-prog; ispell-current-dictionary: american -*-
### Configuration for domain.com.
## HTTP server.
server {
listen 80; # IPv4
server_name localhost;
limit_conn arbeit 32;
## Access and error logs.
access_log /var/log/nginx/domain.access.log;
error_log /var/log/nginx/domain.error.log;
## See the blacklist.conf file at the parent dir: /etc/nginx.
## Deny access based on the User-Agent header.
if ($bad_bot) {
return 444;
}
## Deny access based on the Referer header.
if ($bad_referer) {
return 444;
}
## Protection against illegal HTTP methods. Out of the box only HEAD,
## GET and POST are allowed.
if ($not_allowed_method) {
return 405;
}
## Filesystem root of the site and index.
root /var/www/domain.com/master/src/;
index index.php;
fastcgi_keep_conn on; # keep alive to the FCGI upstream
################################################################
### Generic configuration: for most Drupal 7 sites.
################################################################
include apps/drupal/drupal.conf;
include apps/drupal/drupal_install.conf;
include apps/drupal/drupal_upload_progress.conf;
include nginx_status_vhost.conf;
} # HTTP server