Job Board Software

Setting jobs folder to open different server than main site

From Job Board Software Support

Jump to: navigation, search

Contents

First step

Create A record 'jobsite' in your domain (jobsite.yourwebsite.com) and point to server IP (provided by your account manager)

Implementation examples

  • making JobMount SEO landing pages service to run your /jobs folder added to main website
  • making JobMount job board open in /jobs folder of your main website

Apache option

Configuration options for solution based on:

  • Apache-hosted PHP application (main server, your domain points to)
  • Nginx-hosted Java (job board software)

Main website is run by 3rd party CMS. JobMount job board application is open from separate server.

LoadModule proxy_module modules/mod_rewrite.so

mod_rewrite provides the [P] flag, which allows URLs to be passed, via mod_proxy, to another server.In example, a URL is passed directly to another server, and served as though it were a local URL.

<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteBase /
	RewriteRule ^jobs(.*)	http://jobsite.yourwebsite.com/jobs$1 [P,L]
</IfModule>

Note: You can put this into .htaccess file.

Consider using either ProxyPass or ProxyPassMatch whenever possible in preference to mod_rewrite.

Configure proxy pass/reverse to create folder within main website URL (same domain as main website). In order to do that you need to enable mod_proxy for the Apache.

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

Write following instruction to your Apache config for your virtual host (i.e. yourjobboard.conf, example is for name-based virtual host configuration):

 NameVirtualHost 10.210.125.124:80
 <VirtualHost 10.210.125.124:80>                                                                                       
     ServerName www.yourwebsite.com
     ...
     ProxyRequests Off
     ProxyPreserveHost On
     <Proxy *>
         Order deny,allow
         Allow from all
     </Proxy>
     ProxyPass /jobs http://jobsite.yourwebsite.com/jobs
     ProxyPassReverse /jobs http://jobsite.yourwebsite.com/jobs
     <Location /jobs>
         Order allow,deny
         Allow from all
     </Location>
 ...
 </VirtualHost>

where 10.210.125.124 is IP address of your virtual host.

Note: You can't put this into .htaccess file - it will not work.


Note: jobsite.yourwebsite.com A record shoud poin to jobboardmount server (for example 15.115.200.20) - please ask you manager for valid IP.

Nginx option

Configuration options for solution based on:

  • Nginx-hosted PHP application (main server, your domain points to)
  • Nginx-hosted Java (job board software)

Main website is run by 3rd party CMS. JobMount job board application is open from separate server. Configure proxy pass to create folder within main website URL (same domain as main website).

Write following instruction to your Nginx config for your virtual host (i.e. yourjobboard.conf):

 server {
   listen 80;
   server_name www.yourwebsite.com;
   .....
   location ^~ /jobs {
     proxy_pass http://jobsite.yourwebsite.com/jobs;
   }
   .....
 }

Final steps

Make sure that ServerName (www.yourwebsite.com) in Apache config is match with server_name in Nginx settings and document root of job board server contain folder correspond to proxy_pass location (/jobs).

www.yourwebsite.com will open your job board and www.yourwebsite.com/jobs — JobMount application.

More information

RE & Keywords

  • Adding job board to your website
  • Redirect folder to another server

modified on 16 February 2015 at 15:00 ••• 2,201 views