Dear All, Can I access http://server1.example.com:8080 by creating an alias or URL redirect like admin.example.com etc. I think it will be more convenient for the customers to login to the account by easy URL. Regards Pawan Joshi
Yes, you can do this e.g. with apache rewrite rules. For examples see here: http://httpd.apache.org/docs/current/mod/mod_rewrite.html
Till, I've read through a load of documentation for the mod_rewrite module but can't figure out how to do it for a port such as :8080. Also, must the module be set in httpd.conf?
The rules should work for ports as well. e.g. Code: RewriteCond %{HTTP_HOST} ^admin.example.com [NC] RewriteRule ^/(.*) http://server1.example.com:8080/ [L,R] No. It is lready enabled.
short URL Dear Till, Thanks for the detailed explanation by example. Though I have not tried it, I have another question that is say I have five domain created in ISPCONFIG. I can access ISPCONFIG control panel login from anydomain.tld:8080 that is any five domains with :8080. is it ok.
Okay Im really tearing my hair out with this one. Im using the code: RewriteEngine on RewriteRule ^/admin$ %{HTTP_HOST}:8080/ [R] which of course doesn't work because it takes me to the url http://mydomain.com/mydomain.com:8080 How can i get rid of the first part so im left with domain.com:8080?
Please see my example above. You are currently redirecting to a path and I'am redirecting to URL in my example.
Hmm still cant get it to work. I tried RewriteCond %{HTTP_HOST} ^domain.ath.cx/admin [NC] RewriteRule ^/(.*) domain.ath.cx:8080/ [L,R] could you please point out what im doing wrong? I dont want a subdomain, just a directory to redirect.
You entered a path as redirect target but you have to use a URL. A URL starts with http://. So your rewrite rule has to be a URL like this: RewriteRule ^/(.*) http://domain.ath.cx:8080/ [L,R]
okay my code is now RewriteCond %{HTTP_HOST} ^http://domain.ath.cx/admin [NC] RewriteRule ^/(.*) http://domain.ath.cx:8080/ [L,R] still no joy, seems strange how the other redirect i used worked but this one not.
short URL Dear Till, Please tell if the ISPCONFIG CONTROL PANEL access vide any domain created in ISPCONFIG with :8080 is ok or is there any thing wrong. Second the example you have shown for rewrite, in which file I need to insert that code. is it "ispconfig.vhost" or do i need to insert in website options for all the websites created in ispconfig. Regards
Do not change the rewrite condition, I posted you a different rewriteRule and not a different condition. Rewrite conditions may not contain http://.
short URL I am able to access control panel from any clientdomain:8080. I am running ispconfig 3.0.3 I have just changed the SSL engine to off. I have set the internal ip 192.168.0.10 for the server1.example.com as well as same internal ip for other client domains. I have set external ip for all domains in DNS records. Now where I should look for to correct the situation. Though it is ok for me, if it doesn't create any problem or break the server.
short URL Can I access the server directly at port 80. if yes, how. can I change the same in ispconfig.vhost.
Only if you have a dedicated controlpanel server in a multiserver enviroment that does not host any websites.
short URL I have added this in example.com's apache directive in options tab RewriteCond %{HTTP_HOST}^admin.example.com [NC] RewriteRule ^/(.*)http://server1.example.com:8080/ [L,R] but I am getting the "server not found error". Do I need to add admin in DNS and create sub-domain admin for example.com. I have replaced the example.com for mydomain.
1) Have you created a DNS A-Record for admin.example.com that points to the IP of the website? 2) Have you added admin.example.com as subdomain to the website example.com? 3) You missed several whitespaces in the condition and rule.
Sorry to bother you again till but I still cant seem to get it working, this time i will post screen shots. I want to browse to mydomain.ath.cx/admin to be redirected to mydomain:8080.