Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
<VirtualHost *:80>
ServerName example.in
## Add the usual vhost stuff and then ##
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://10.200.2.0/home/
ProxyPassReverse / http://10.200.2.0/home/
</VirtualHost>
When i had a restart example.com works fine ,example.in delivers 502 proxy error
Whether it neccesssary to have two virtual host since example.in accessing same example.com directory /home folder.whether its easier to achieve my configuration by mod rewrite are else by proxypassReverse
Alias /cms/modules/ /tomcat/webapps/cms/modules
Alias /cms/themes/ /tomcat/webapps/cms/themes
Alias /cms/images/ /tomcat/webapps/cms/images
Alias /cms/css/ /tomcat/webapps/cms/css
Alias /images /tomcat/static/images
Alias /js /tomcat/static/js
Alias /css /tomcat/static/css
Alias /cms/admin /tomcat/webapps/cms/admin
Alias /cms/generated /tomcat/webapps/cms/generated
Alias /php /tomcat/static/php
<Directory /tomcat/static/php>
DirectoryIndex index.php
AllowOverride FileInfo
Options -Indexes +FollowSymLinks -MultiViews
Order allow,deny
Allow from all
</Directory>
<Directory /deployement/tomcat/static>
Allow from all
</Directory>
#compress content with type html, text, and css
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/*
</VirtualHost>
httpd-example.in
Quote:
<VirtualHost *:80>
ServerName example.in
Alias /cms/modules/ /tomcat/webapps/cms/modules
Alias /cms/themes/ /tomcat/webapps/cms/themes
Alias /cms/images/ /tomcat/webapps/cms/images
Alias /cms/css/ /tomcat/webapps/cms/css
Alias /images /tomcat//static/images
Alias /js /tomcat/static/js
Alias /css /tomcat/static/css
Alias /cms/admin /tomcat/webapps/cms/admin
Alias /cms/generated /tomcat/webapps/cms/generated
Alias /php /tomcat/static/php
<Directory /tomcat/static/php>
DirectoryIndex index.php
AllowOverride FileInfo
Options -Indexes +FollowSymLinks -MultiViews
Order allow,deny
Allow from all
</Directory>
<Directory /deployement/tomcat/static>
Allow from all
</Directory>
The 502 error you get could be due to a variety of reasons. So take a look at both apache and the backend server's logs.
I guess the backend is a tomcat server, so keep in mind that if you use a reverse proxy configuration like the one I've posted above, there is no need to for anything related to mod_jk. You should choose only 1 method of connecting to tomcat, either by mod_jk, or through a reverse proxy setup.
Also the various Alias, <Directory ...> etc, are useless in the latter case
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.