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)
-   -   Client nginx redirection configuration (http://www.howtoforge.com/forums/showthread.php?t=61011)

pchott 18th March 2013 21:00

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

almere 18th March 2013 21:13

Quote:

Originally Posted by pchott (Post 294191)
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...

pchott 18th March 2013 21:18

Quote:

Originally Posted by almere (Post 294192)
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?:confused:

almere 18th March 2013 21:21

Quote:

Originally Posted by pchott (Post 294193)
Ok, that syntax but how can client write that himself over ISPconfig or someway else?:confused:

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.

pchott 18th March 2013 21:29

Quote:

Originally Posted by almere (Post 294194)
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.

almere 18th March 2013 21:30

Of course it does :D

falko 23rd March 2013 18:04

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...).

pchott 2nd April 2013 19:26

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

falko 5th April 2013 00:14

Quote:

Originally Posted by pchott (Post 295238)
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.


All times are GMT +2. The time now is 05:32.

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