VPS as web server

fkasmani

New member
Hello,

I've taken up a VPS and am looking at setting up webERP on it which works entirely as a web based app.

The option I took up is CentOS 6.2 minimal based and came with only the root user and thus the ~/home directory was blank.
I've setup a new user and group by the name of webERP and in that created a folder public_html
So I now have a path
Code:
~/home/webERP/public_html
In this I made a text.txt and tried to access it as follows
Code:
http://ipnumber/test.txt
which resulted in a 404 not found:shaky:

Do I need to do any settings or configuration to the server to make it direct all web traffic to ~/home/webERP/public_html

BTW, the VPS came blank with no type of control panel or WHM and I installed Webmin.

Would really appreciate some help on this, pls.

Regards.
 
You won't be able to access files through the IP of the server I wouldn't of thought, you'll need to create a domain within webmin and add files through the file manager, then do your domain and file path in the browser (www.example.com/test.txt) - Not 100% if .txt files work though, try renaming it to a .html, .php or .htm extension.
 
You won't be able to access files through the IP of the server I wouldn't of thought, you'll need to create a domain within webmin and add files through the file manager, then do your domain and file path in the browser (www.example.com/test.txt) - Not 100% if .txt files work though, try renaming it to a .html, .php or .htm extension.

Thanks, in webmin, what's the easiest way to setup a domain and get it to ~/home/webERP/public_html

Googling around on this and have come across http://rimuhosting.com/howto/virtualhosting.jsp which i'm tying out.
 
Last edited:
I usually just create a separate account to my main root account for each website.

For example WebSound on a VPS would have the account name 'WebSound' with the domain as our domain name, that way the WebSound domain would be assigned to the WebSound public_html folder and any files that are put in there (such as index.php) would be accessed through the websound domain (www.example.com/index.php)
 
Looks like the location problem is solved and am not getting a 404 after I moved the webERP folder from "~/home/webERP/public_html" to "~/var/www/html" (as per what was stated in Apache Webserver (in Webmin). However, when I'm trying to load a .php file (eg: http://ipnumber/webERP/install/index.php) it just displays the core contents of the php file in the browser.
 
Thanks so much for your support.

Unfortunately the issue is not solved yet - I ordered the VPS and paid one year up front so they'd installed and configure LAMP but now realise they didn't, so I've decided to re-format the VPS and install/configure LAMP myself.

Will post the updates.
 
Looks like the location problem is solved and am not getting a 404 after I moved the webERP folder from "~/home/webERP/public_html" to "~/var/www/html" (as per what was stated in Apache Webserver (in Webmin). However, when I'm trying to load a .php file (eg: http://ipnumber/webERP/install/index.php) it just displays the core contents of the php file in the browser.
Is PHP installed and running?

Is the PHP file well coded?
 
Top