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

I just switched over to working with a gentoo server, and am having problems installing apache with mod_proxy. I've gone over many of the documents for using the USE command but haven't figured out how to recompile Apache with mod_proxy support.

To be clear I have apache installed but mod_proxy is currently not available in my modules folder. The apache modules which I get when trying

emerge -pv apache

APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias -asis -auth_digest -authn_dbd -cern_meta -charset_lite -dbd -dumpio -ident -imagemap -log_forensic -proxy -proxy_ajp -proxy_balancer -proxy_connect -proxy_ftp -proxy_http -substitute -version" APACHE2_MPMS="-event -itk -peruser -prefork -worker" 0 kB
share|improve this question

2 Answers 2

up vote 2 down vote accepted

I tried following unixbhaskar's advice however it still compiled apache without the proxy modules, however I found instead of using USE but setting APACHE2_MODULEs:

APACHE2_MODULES="proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" emerge -av apache

Successfully installed apache with the mod_proxy modules in the appropriate /usr/lib/apache/modules folder.

share|improve this answer
1  
That was a one-time command. You might want to set the APACHE2_MODULES variable in your make.conf file so that it doesn't get lost when you upgrade. –  Jim T Nov 1 '10 at 17:22
    
Great man thank you. –  pregmatch Oct 23 '13 at 16:05

Please follow my instruction carefully:

root@bhaskar-laptop_08:29:26_Mon Nov 01:/ # sudo USE="mod_proxy" emerge -av apache

These are the packages that would be merged, in order:

Calculating dependencies... done! [ebuild R ] www-servers/apache-2.2.16 USE="ldap ssl -debug -doc (-selinux) -static -suexec -threads" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias -asis -auth_digest -authn_dbd -cern_meta -charset_lite -dbd -dumpio -ident -imagemap -log_forensic -proxy -proxy_ajp -proxy_balancer -proxy_connect -proxy_ftp -proxy_http -substitute -version" APACHE2_MPMS="-event -itk -peruser -prefork -worker" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

Would you like to merge these packages? [Yes/No] n

Quitting.

I hope the bold portion is your concern means you want to activate right?? if so, then please use the USE flag and include those option then emerge . As I do in the above..just replace mod_proxy with the bold options and it will solve your owes.

share|improve this answer
    
To clarify for OP, add proxy,proxy_ajp,proxy_balanace,proxy_connect,proxy_ftp,proxy_http to your USE flags to enable mod_proxy support. Otherwise, spot on, unixbhaskar! –  Andrew M. Nov 1 '10 at 7:21
    
@Redmumba: Kind of spot on. For one-time installation that "USE=foo emerge bar" voodoo is OK, but that method has a one major flaw: if you happen to upgrade your Gentoo or install that certain package again, chances are you will lost those USE flags if you don't remember to provide them again and are not looking at the emerge output carefully. It's better to add those USE flags under /etc/portage/package.use or even create package-specific files under /etc/portage. –  Janne Pikkarainen Nov 1 '10 at 8:32

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.