0

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.

HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
Seiti
  • 145
  • 1
  • 3
  • 10
  • 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 07: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
  • [Administration panels are off topic](http://serverfault.com/help/on-topic). [Even the presence of an administration panel on a system,](http://meta.serverfault.com/q/6538/118258) because they [take over the systems in strange and non-standard ways, making it difficult or even impossible for actual system administrators to manage the servers normally](http://meta.serverfault.com/a/3924/118258), and tend to indicate low-quality questions from *users* with insufficient knowledge for this site. – HopelessN00b Mar 11 '15 at 18:36

2 Answers2

4

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

Dave Forgac
  • 3,546
  • 7
  • 37
  • 48
  • 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
    Particularly: http://docs.cpanel.net/twiki/bin/view/EasyApache3/InsideVHost – philfreo Jun 06 '11 at 02:35
  • http://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 '14 at 07:23
0

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.

jemmille
  • 304
  • 1
  • 5
  • 17