VPS with one ip, use with one site on dedicated ip

emielvenlo

Verified User
Joined
Oct 21, 2008
Messages
11
My goal is the following:
I have a VPS, with one ip. I want to use the VPS to serve just one site. But because of the nature of the script i use on the site, i have to use a dedicated ip.
The problem is that the company that hosts the vps, can only give me one IP adres.

Is it possible in DA to asign the only ip of the vps to one site as a dedicated ip?
If not, is it possible to force the vps, to work around DA in this case?
 
Thanks Alex!
When i use this option, are there any disadvantageous to this? It would be a wordpress installation with domainmapping, domains have to point to the ip adress. Is it possible to for instance write mediafiles into the directory there? Backup via DA would this still work? Is this the only option?
 
Thanks Alex!
When i use this option, are there any disadvantageous to this? It would be a wordpress installation with domainmapping, domains have to point to the ip adress. Is it possible to for instance write mediafiles into the directory there? Backup via DA would this still work? Is this the only option?

If you need these all things, then you'd better set up an alias in httpd config for your script, e.g.:

in /etc/httpd/conf/extra/httpd-includes.conf

Code:
Alias /script.php "/home/username/domains/domain.com/public_html/script.php"

Substitute:

script.php
username
domain.com

with your actual and real information.
 
Oke Alex, that looks like a cool solution.

Would something like this work to:
Code:
Alias /* "/home/username/domains/domain.com/public_html/*"

The whole vps is just for this site, and everything that comes to this vps needs to go the the website in the user.
 
I've tried this. If you need all document root to be available from IP, then you'd better change document root in /etc/httpd/conf/extra/httpd-vhosts.conf from

Code:
DocumentRoot /var/www/html

to

Code:
DocumentRoot /home/username/domains/domain.com/public_html/

and chattr the file immutable, to keep changes against being overwritten.

Note, you might need to do other changes in the file, according your configuration of PHP.
 
Back
Top