use subdirectories instead of subdomains

Thuban thuban at
Fri Apr 25 16:06:34 UTC 2014

I am trying to use subdirectories instead of subdomains because my host
doesn't support subdomains.

So, instead of having : 


I would like to have : 

I tried to do such things with `location` rules and `alias`.Example : 

    root /var/www/mysite;
    location /owncloud {
        alias /var/www/mysite/owncloud;
        include /etc/nginx/conf.d/owncloud.conf;

, but services like owncloud need `location` rules too, so I finally
have "location /example is outside location" errors.

How can I configure nginx for this?


: /` )   Thuban
| `-'    PubKey :
 \_      KeyID : 0x54CD2F2F
Envoyé à partir de mon serveur auto-hébergé
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <>

More information about the nginx mailing list