Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 18th March 2013, 22:00
pchott pchott is offline
Junior Member
 
Join Date: Feb 2013
Posts: 11
Thanks: 2
Thanked 1 Time in 1 Post
Question Client nginx redirection configuration

How can client with ISPconfig manage redirection in nginx?

Like:
http://www.domain.com/test.php ---> http://www.domain.com/index.php
http://www.domain.com/test2.php ---> http://www.domain.com/index.php
...

something that htaccess is used at apache.

nginx Directive can only admin manage.

Thank you,
Jan
Reply With Quote
Sponsored Links
  #2  
Old 18th March 2013, 22:13
almere almere is offline
ISPConfig Developer
 
Join Date: Nov 2012
Location: Netherlands, Rotterdam
Posts: 231
Thanks: 20
Thanked 39 Times in 34 Posts
Send a message via Skype™ to almere
Default

Quote:
Originally Posted by pchott View Post
How can client with ISPconfig manage redirection in nginx?

Like:
http://www.domain.com/test.php ---> http://www.domain.com/index.php
http://www.domain.com/test2.php ---> http://www.domain.com/index.php
...

something that htaccess is used at apache.

nginx Directive can only admin manage.

Thank you,
Jan
First: rewrite ^/test.php$ /index.php redirect;

Second: rewrite ^/test2.php$ /index.php redirect;

Didn't test it. But should works...
Reply With Quote
  #3  
Old 18th March 2013, 22:18
pchott pchott is offline
Junior Member
 
Join Date: Feb 2013
Posts: 11
Thanks: 2
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by almere View Post
First: rewrite ^/test.php$ /index.php redirect;

Second: rewrite ^/test2.php$ /index.php redirect;

Didn't test it. But should works...
Ok, that syntax but how can client write that himself over ISPconfig or someway else?
Reply With Quote
  #4  
Old 18th March 2013, 22:21
almere almere is offline
ISPConfig Developer
 
Join Date: Nov 2012
Location: Netherlands, Rotterdam
Posts: 231
Thanks: 20
Thanked 39 Times in 34 Posts
Send a message via Skype™ to almere
Default

Quote:
Originally Posted by pchott View Post
Ok, that syntax but how can client write that himself over ISPconfig or someway else?
Well, what i posted above is for .htaccess file, so your clients can use it.
It's currently not possible to set redirect from one file to another in ISPConfig.
Reply With Quote
The Following User Says Thank You to almere For This Useful Post:
pchott (18th March 2013)
  #5  
Old 18th March 2013, 22:29
pchott pchott is offline
Junior Member
 
Join Date: Feb 2013
Posts: 11
Thanks: 2
Thanked 1 Time in 1 Post
Smile

Quote:
Originally Posted by almere View Post
Well, what i posted above is for .htaccess file, so your clients can use it.
It's currently not possible to set redirect from one file to another in ISPConfig.
Stupid me I thought that nginx does not use htaccess file.
Reply With Quote
  #6  
Old 18th March 2013, 22:30
almere almere is offline
ISPConfig Developer
 
Join Date: Nov 2012
Location: Netherlands, Rotterdam
Posts: 231
Thanks: 20
Thanked 39 Times in 34 Posts
Send a message via Skype™ to almere
Default

Of course it does
Reply With Quote
  #7  
Old 23rd March 2013, 19:04
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
Default

You can place your rewrite rules in the nginx Directives field on the Options tab of a website in ISPConfig. Of course, the Options tab is accessible only for admin to avoid people placing rubbish in that field (which would prevent nginx from starting...).
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #8  
Old 2nd April 2013, 20:26
pchott pchott is offline
Junior Member
 
Join Date: Feb 2013
Posts: 11
Thanks: 2
Thanked 1 Time in 1 Post
Default Still some confusion

thank you falko, that option i have find and is working nicely.

I still don't know how client can use htaccess. Accoring to nginx http://wiki.nginx.org/LikeApache-htaccess it does not support htaccess, so that means that somehow i have to specially add some configuration so nginx would read htaccess file.

Problem is that client need to manage rewrite himself

Last edited by pchott; 2nd April 2013 at 20:29. Reason: additional info
Reply With Quote
  #9  
Old 5th April 2013, 01:14
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
 
Default

Quote:
Originally Posted by pchott View Post
Problem is that client need to manage rewrite himself
That's not possible without admin access to ISPConfig. That's why nginx hosting should be offered as managed hosting only, i.e., the hoster manages rewrites for the client.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
php-fpm configuration on nginx ijujym Installation/Configuration 3 14th December 2012 19:14
Strange error: client denied by server configuration manarak General 2 10th June 2012 12:55
magento installation and client denied by server configuration error pawan Installation/Configuration 3 4th April 2012 01:34
Being Spammed/Hacked/Probed not sure PLEASE HELP! kresser General 10 29th October 2010 18:25
email client configuration davidg General 3 22nd August 2005 17:40


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


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