Get Paid to Participate - up to $1 per post!     Twitter     Facebook     Google+
Hosting Discussion
 

forgot password?



Reply


Old
  Post #1 (permalink)   01-09-2011, 12:47 PM
HD Addict
 
webling's Avatar
 
Join Date: Dec 2010
Posts: 243

Status: webling is offline
Does anyone have experience with mod_rewrite or would I use another approach to this?

I want to make anyvirtualhost.com/menu forward to anyvirtualhost:8880

This is so clients don't have to use the URL Plesk sets up and can simply type /menu after their hostname to login to the control panel.

To my knowledge, Plesk or Virtuozzo don't have any configuration for this and so it would need to be done in the httpd.conf file.

Would adding an alias accomplish this such as: Alias /menu/ ":8880"

Last edited by webling : 01-09-2011 at 01:15 PM. Reason: Adding information
 
 
 


Old
  Post #2 (permalink)   01-09-2011, 01:33 PM
HD Community Advisor
 
ughosting's Avatar
 
Join Date: Jan 2011
Location: London
Posts: 608

Status: ughosting is offline
I don't think mod rewrite is what you need.

I think you need a ProxyPass and ProxyPassReverse in your vhost to do this!
__________________
DDoS Protected, LiteSpeed + LiteMage on CloudLinux with SSD Disks, R1Soft, Softaculous, SIteBuilder, BitNinja, LetsEncypt & Patchman
UnixGuru: Accounts with 1-16 CPU Cores, 2-32GB RAM. Why use a VPS?
█ Choose from Shared, Reseller and Elastic-Sites Hosting
 
 
 


Old
  Post #3 (permalink)   01-09-2011, 02:31 PM
HD Addict
 
webling's Avatar
 
Join Date: Dec 2010
Posts: 243

Status: webling is offline
Quote:
Originally Posted by ughosting View Post
I don't think mod rewrite is what you need.

I think you need a ProxyPass and ProxyPassReverse in your vhost to do this!
This does appear to be the solution. However, editing directly to the httpd.conf file can cause Plesk to not work properly and also the domain can disappear. I had to remove the code and any spacing I added and the domain came back.
 
 
 


Old
  Post #4 (permalink)   01-12-2011, 12:29 PM
HD Community Advisor
 
ughosting's Avatar
 
Join Date: Jan 2011
Location: London
Posts: 608

Status: ughosting is offline
With plesk you must create a vhost.conf in the conf directory of the domain.

/var/www/vhosts/<domain>/conf/vhost.conf

Anything in here overides the httpd.conf

Plesk does not automatically find these vhost.conf files so the run the following command

/usr/local/psa/admin/bin/websrvmng -av

Once plesk has picked the vhost.conf file up you shouldn't have to call the script again when you edit it, just merely restart apache gracefully.

I hope this helps!
__________________
DDoS Protected, LiteSpeed + LiteMage on CloudLinux with SSD Disks, R1Soft, Softaculous, SIteBuilder, BitNinja, LetsEncypt & Patchman
UnixGuru: Accounts with 1-16 CPU Cores, 2-32GB RAM. Why use a VPS?
█ Choose from Shared, Reseller and Elastic-Sites Hosting
 
 


Old
  Post #5 (permalink)   01-16-2011, 05:00 PM
HD Addict
 
webling's Avatar
 
Join Date: Dec 2010
Posts: 243

Status: webling is offline
I'm considering adding an alias to the vhost configuration file and popping an htaccess file into the directory so when any vhost on my server goes to somedomain.com/menu it will take them to the login page for their control panel. I think this would be an easier task.
 
 
 


Old
  Post #6 (permalink)   01-19-2011, 02:46 PM
HD Community Advisor
 
ughosting's Avatar
 
Join Date: Jan 2011
Location: London
Posts: 608

Status: ughosting is offline
You could create a file called menu.conf in /etc/httpd/conf.d

That would contain something along the line of

Alias /menu "/var/www/menu"

in /var/www/menu you place your .htaccess file
__________________
DDoS Protected, LiteSpeed + LiteMage on CloudLinux with SSD Disks, R1Soft, Softaculous, SIteBuilder, BitNinja, LetsEncypt & Patchman
UnixGuru: Accounts with 1-16 CPU Cores, 2-32GB RAM. Why use a VPS?
█ Choose from Shared, Reseller and Elastic-Sites Hosting

Last edited by ughosting : 01-19-2011 at 02:47 PM. Reason: type
 
 
 


Old
  Post #7 (permalink)   01-20-2011, 05:26 PM
HD Addict
 
webling's Avatar
 
Join Date: Dec 2010
Posts: 243

Status: webling is offline
Quote:
Originally Posted by ughosting View Post
You could create a file called menu.conf in /etc/httpd/conf.d

That would contain something along the line of

Alias /menu "/var/www/menu"

in /var/www/menu you place your .htaccess file
Here's an idea also, this way I wouldn't have to write an htaccess file. Would it be possible to create a vhost.conf for each domain in
/var/www/vhosts/thedomain.com/conf/vhost.conf

and then simply add the alias there without having to use an htaccess file? Such as this...

Alias /menu /path/to/the/control/panel

It seems to me that would be easier even though it would have to be configured for each domain.
 
 
 


Old
  Post #8 (permalink)   01-23-2011, 06:38 AM
HD Community Advisor
 
ughosting's Avatar
 
Join Date: Jan 2011
Location: London
Posts: 608

Status: ughosting is offline
If you did what I had previously stated it would apply to ALL domains!
__________________
DDoS Protected, LiteSpeed + LiteMage on CloudLinux with SSD Disks, R1Soft, Softaculous, SIteBuilder, BitNinja, LetsEncypt & Patchman
UnixGuru: Accounts with 1-16 CPU Cores, 2-32GB RAM. Why use a VPS?
█ Choose from Shared, Reseller and Elastic-Sites Hosting

Last edited by ughosting : 01-23-2011 at 06:39 AM. Reason: typo
 
 
 
Reply

Thread Tools

New Post New Post   Old Post Old Post
Posting Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Sponsored By: