HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   AliasDomain for Website on nginx (http://www.howtoforge.com/forums/showthread.php?t=56237)

jackl 20th February 2012 10:54

AliasDomain for Website on nginx
 
Hi There!

I'm trying to use Aliasdomain for website in ISPConfig 3 on nginx and it's working fine except for one thing, it is adding $1 to the end of the Redirect Path and that is messing up the URL and I'm getting 404 or 500 error. I'm just wondering if there is a work around.

By the way, I'm using it for wiildcard:
test.mydomain.com
will be redirected to:
http://www.mydomain.com/test.hml
but using the Aliasdomain for website feature creates this:
http://www.mydomain.com/test.html/index.php
I am using Joomla 2.5.1 with SEF turned on by the way. Till or anybody, do you know a work around with what I'm trying to do?

Thanks!

:confused:

till 20th February 2012 11:07

The redirect feature is made to redirect a url to a folder and not to a file. so you have to change your redirect path from:

http://www.mydomain.com/test.hml

to:

http://www.mydomain.com/

jackl 20th February 2012 20:40

Bummer!

Till, can you guide me where do I find the php file that creates the nginx .conf directives. :D desperately I just needed this wildcard feature for our communications team to do it by themselves, if this is not too tedious to modify everytime a new ISPConfig version comes out I would rather hack the code. I would just like to remove the $1 it added to the redirect path and everything should work as I want it to be.

Oh, and a question, why does the script add $1 to the end of the rewrite nginx directive by the way? Nginx supposed to know what index file to load regardless it is specified or not.

Big thanks Till!

falko 21st February 2012 13:39

Quote:

Originally Posted by jackl (Post 273902)
Oh, and a question, why does the script add $1 to the end of the rewrite nginx directive by the way? Nginx supposed to know what index file to load regardless it is specified or not.

I've added this to our bugtracker. I'll check it.

till 21st February 2012 15:24

Quote:

Oh, and a question, why does the script add $1 to the end of the rewrite nginx directive by the way? Nginx supposed to know what index file to load regardless it is specified or not.
The $1 is to rewrite to the same path, it is not related to the index file.

Quote:

if this is not too tedious to modify everytime a new ISPConfig version comes out I would rather hack the code.
Thats not nescessary, as this can all be configured in the nginx_vhost.conf.master template. So you can configure it on your server as you need it and it wont get overwritten on updates when you put the modified configuration file in the conf-custom folder.


All times are GMT +2. The time now is 18:21.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.