-1

I have a vps server. LAMP is installed in it.

Consider the IP as 99.88.77.66

I want to run two application on this site. One is vtiger and other is redmine.

Installation Location
redmine: /var/www/html/redmine
vtiger: /var/www/html/vtigerCRM

I configured httpd.conf as..

ServerName 99.88.77.66:80

..

DocumentRoot "/var/www/html"

..

<Directory "/var/www/html">

..

NameVirtualHost *:80

..

<VirtualHost *:80>
    DocumentRoot "/var/www/html"
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "/var/www/html/redmine/public"
    ServerName localhost
    ServerAlias redmine
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "/var/www/html/vtigerCRM"
    ServerName localhost
    ServerAlias vtiger
</VirtualHost>

/etc/hosts as..

127.0.0.1       redmine
127.0.0.1       vtiger
127.0.0.1       localhost

Please help me configure in such a way that, by access http://99.88.77.66/redmine -- I would be able to access redmine and by http://99.88.77.66/vtiger -- vtigerCRM.

Sachin
  • 11
  • 6
  • You do not need vhosts to access two sites via same IP and different folders. Just have one hostname with two folders. – ek9 Apr 14 '14 at 12:09
  • Hi, I can access via `http://99.88.77.66/vtigerCRM` but when I m doing with redmine , the directory listing is happening. By default redmine documentroot suppose to be `http://99.88.77.66/redmine/public` – Sachin Apr 14 '14 at 12:12
  • Setup a rewrite for that? – ek9 Apr 14 '14 at 12:14
  • I don't understand sorry, could you please re-write for me if possible? – Sachin Apr 14 '14 at 12:15
  • Put in `/redmine/.htaccess`: RewriteEngine On RewriteRule ^$ /public/ [R=301,L] – ek9 Apr 14 '14 at 12:17

1 Answers1

-1

You will not be able to acces it like that, but you can configure,

<VirtualHost *:80>
DocumentRoot "/var/www/html/vtigerCRM"
ServerName vtigercrm.com
ServerAlias www.vtigercrm.com

and the your /etc/hosts(on Linux/mac) or system32/drivers/etc/hosts (on Windows) file add

99.88.77.66 vtigercrm.com
99.88.77.66 redmine.com

and you will be able to access the websites on your new IP

J Bourne
  • 1,409
  • 2
  • 14
  • 33
  • Read question, this is not what he wants. He doesn't even need to use Vhosts for what he wants to accoplish. – ek9 Apr 14 '14 at 12:16