Welcome! Log In Create A New Profile

Advanced

Re: use subdirectories instead of subdomains

April 25, 2014 12:54PM
Hello,


On 4/25/14, 12:06 PM, Thuban wrote:
> Hello,
> I am trying to use subdirectories instead of subdomains because my host
> doesn't support subdomains.

First suggestion is get a better host.

>
> So, instead of having :
>
> - http://owncloud.example.com
> - http://wordpress.example.com
> - http://anyservice.example.com
>
> I would like to have :
> - http://example.com/owncloud
> - http://example.com/wordpress
> - http://example.com/anyservice
>
> 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?

Why are you using an alias here? If the root is /var/www/mysite then

location /owncloud

would be interpreted as /var/www/mysite/owncloud which I'm guessing is
what you want.


--
Jim Ohlstein


"Never argue with a fool, onlookers may not be able to tell the
difference." - Mark Twain

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

use subdirectories instead of subdomains

Thuban April 25, 2014 12:08PM

Re: use subdirectories instead of subdomains

Jim Ohlstein April 25, 2014 12:54PM

Re: use subdirectories instead of subdomains

Thuban April 25, 2014 01:20PM

Re: use subdirectories instead of subdomains

Jim Ohlstein April 25, 2014 02:18PM

Re: use subdirectories instead of subdomains

Thuban April 25, 2014 04:00PM

Re: use subdirectories instead of subdomains

Jim Ohlstein April 25, 2014 04:44PM

Re: use subdirectories instead of subdomains

Thuban April 27, 2014 12:18PM

Re: use subdirectories instead of subdomains

itpp2012 April 25, 2014 03:34PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 181
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