handling subdirectories location
Thiago Farina
tfransosi at gmail.com
Mon Jun 8 23:53:45 UTC 2015
On Mon, Jun 8, 2015 at 8:26 PM, Francis Daly <francis at daoine.org> wrote:
> On Mon, Jun 08, 2015 at 08:08:10PM -0300, Thiago Farina wrote:
>> On Mon, Jun 8, 2015 at 7:46 PM, Francis Daly <francis at daoine.org> wrote:
>> > On Mon, Jun 08, 2015 at 02:07:54PM -0300, Thiago Farina wrote:
>
> Hi there,
>
>> server {
>> listen 80;
>> server_name domainame.com;
>>
>> root /data/www/domainame.com;
>> include fastcgi.conf;
>>
>> location ^~ /gocart/ {
>> location ~ \.php($|/) {
>> fastcgi_split_path_info (.*.php)(/.*);
>> fastcgi_pass 127.0.0.1:9000; #unix:/var/run/php5-fpm.sock;
>> }
>> }
>> }
>>
>> But when I navigate to http://domainame.com/gocart nginx returns 403 Forbidden.
>
> What response do you want?
>
> Be as specific as possible.
>
> (I suspect that the answer is "a http redirect to
> http://domainame.com/gocart/"; but I'm reluctant to guess.)
>
Isn't obvious what I want? I want the page to load, so if it is "http
redirect to http://domainame.com/gocart/", then yes.
> Perhaps adding "index index.html index.php;" at server-level will help?
>
Yes, it helps load the start page. But all the links redirects to
http://domainame.com/gocart/.
What I'm trying to do is not common? I thought it would be pretty
common to do what I'm trying to do, but the solution seems to be very
complicated for something that does not look so complicated at glance.
Trying once more, what I'm trying to setup is pretty much exactly this
https://gist.github.com/LkeMitchll/b6d8aea6c0845e3a341f,
http://stackoverflow.com/questions/24820657/nginx-multiple-php-sites-in-sub-directories.
> The machine will do exactly what you tell it to. It will only do what
> you want it to, if you tell it what you want.
>
>> Basically what I'm trying to do is to run gocart
>> (https://gocartdv.com) and phorum (www.phorum.org) in
>
> I don't see any obvious "how to install this on a web server, from scratch"
> documentation on either of those web sites. Perhaps I'm looking in the
> wrong place.
>
That seems unrelated to this thread. But they all have install instructions.
--
Thiago Farina
More information about the nginx
mailing list