Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm setting up a server and trying to configure the Apache. It only needs to work as a frontend to Tomcat.

To do that I added some instructions to the VirtualHost directive, using mod_proxy:

<VirtualHost *>
  ServerName myserver.domain.com
  ProxyRequests Off
  ProxyPass / http://myserver.domain.com:8080/
  ProxyPassReverse / http://myserver.domain.com:8080/    
</VirtualHost>

It works fine, and if the need comes, I´ll use mod_jk.

But, how do I do it the right way using easyapache, and stop it to always rewrite my changes.

share|improve this question
    
It sounds silly to ask, but have you opened a ticket with cPanel support? They're normally quite good. –  Jon Cram Jul 17 '09 at 7:11
    
No questions are silly (and I hope mine neither) =) Didn't tried it yet. I´m used to mess the system using ssh and vi, but new to this nice UI WHM thing. I will try it, thanks. –  Seiti Jul 17 '09 at 14:58

2 Answers 2

up vote 4 down vote accepted

You should really only use the distiller or templates if you're making changes to the server-wide configurations.

If you're making changes to individual virtual hosts, you should use their (slightly convoluted) includes system:

http://www.cpanel.net/documentation/easyapache/customdirectives.html#vhost

share|improve this answer
1  
Looks like "how to make a hard task easier and friendly, making it harder and cumbersome"... =( –  Seiti Aug 11 '09 at 23:18
1  
    
docs.cpanel.net/twiki/bin/view/EasyApache3/CustomDirectives is not a valid link. perhaps servervault should remove extremely old crap from the serps. –  user3474835 Aug 25 at 7:23

You'll need to run the EasyApache distiller. Make your changes, then run:

usr/local/cpanel/bin/apache_conf_distiller --update

Then run:

/scripts/rebuildhttpdconf

When you run this last script it will run a configuration check and rebuild httpd.conf with your changes intact (or let you know you screwed up). If you end up having/needing lots of custom things I would recommend reading up on using the vhost.local templates.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.