• How to host php site on vps without installing a whole cpanel
    11 replies, posted
I just want to host a few php sites (loading screens for my gmod servers) and because of the huge amount of players joining everyday I've almost reached the 20GB bandwith limit that I have on the shared hosting so I want to move all the sites to a vps. I wonder what I have to install to have a public_html folder where I could drop everything, I don't want to install a whole control panel because it will use too much resources and the vps has other apps running. I have Ubuntu Server x86 14.04 on it and 1GB of ram with 3TB bandwith. Php landings are less than 2mb each one (I have 7 of them) and use js for a text animation. I don't need to get everything done, just point me to the right direction. Thanks
Basically just apache. If you're in ssh with the server you can try "locate public_html" and it will show you if it already exists (which means that apache will be there). Then if you're on centos you can simply do "yum install php" and you'll have php up.
Sorry, but if you have to ask this, you're not ready to operate an internet-facing Linux server. (Usually inexperience is not a problem, but when you own something that's accessible from the internet, you need to be able to protect it from hackers.) [QUOTE=01271;46726016]Then if you're on centos you can simply do "yum install php" and you'll have php up.[/QUOTE] OP said they're on Ubuntu.
[QUOTE=01271;46726016]Basically just apache. If you're in ssh with the server you can try "locate public_html" and it will show you if it already exists (which means that apache will be there). Then if you're on centos you can simply do "yum install php" and you'll have php up.[/QUOTE] Thank you for your answer, I tried the locate thing but this just located some manuals from apache2 that came already installed. In my system the public_html folder is called just html and it's inside /var/www so I just dropped everything in separate folders there and installed php5 with apt-get install php5 and websites are working great now! Thank you a lot, I was missing the php thing [editline]16th December 2014[/editline] [QUOTE=DrTaxi;46726150]Sorry, but if you have to ask this, you're not ready to operate an internet-facing Linux server. (Usually inexperience is not a problem, but when you own something that's accessible from the internet, you need to be able to protect it from hackers.) OP said they're on Ubuntu.[/QUOTE] Don't worry my servers are safe, I have all the ports changed and really secure passwords. I may not be ready to operate servers, but I have 7 vps, 3 dedicated servers and shared hosting and everything is working great, we aren't born knowing everything so that's why I asked here for advice. When I purchased my first vps I didn't know that it came without a gui and that when I type the password it won't appear on screen, but I needed to use it so I put a lot of effort and learned for myself. Now I operate everything without gui and I'm still learning new things. That's why I love technology.
DrTaxi you have to start somewhere and it's pretty hard to mess up a LAMP stack. After a year of self-teaching I got myself a LEMP stack running rémi-php and I still haven't had a hack.
[QUOTE=alrynec;46726394]Thank you for your answer, I tried the locate thing but this just located some manuals from apache2 that came already installed. In my system the public_html folder is called just html and it's inside /var/www so I just dropped everything in separate folders there and installed php5 with apt-get install php5 and websites are working great now! Thank you a lot, I was missing the php thing [editline]16th December 2014[/editline] Don't worry my servers are safe, I have all the ports changed and really secure passwords. I may not be ready to operate servers, but I have 7 vps, 3 dedicated servers and shared hosting and everything is working great, we aren't born knowing everything so that's why I asked here for advice. When I purchased my first vps I didn't know that it came without a gui and that when I type the password it won't appear on screen, but I needed to use it so I put a lot of effort and learned for myself. Now I operate everything without gui and I'm still learning new things. That's why I love technology.[/QUOTE] Changing the ports won't help you at all. Just a portscan on your server and people can find out what port is running what.
[QUOTE=Cyberuben;46726702]Changing the ports won't help you at all. Just a portscan on your server and people can find out what port is running what.[/QUOTE] Really? Some expert in networking told me that others can see if the posts are open or closed but not what is every port running. He might be wrong
[QUOTE=01271;46726598]DrTaxi you have to start somewhere and it's pretty hard to mess up a LAMP stack. After a year of self-teaching I got myself a LEMP stack running rémi-php and I still haven't had a hack.[/QUOTE] Well, you can start at home. And if you're either too inexperienced or too lazy to find out how to set up a web server with PHP support using Google, that indicates to me that you're probably not going to secure your servers, install updates etc. I will admit that the default configurations for most servers in most Linux distributions are secure enough by default, but it still takes some care to ensure your systems stay that way. [QUOTE=Cyberuben;46726702]Changing the ports won't help you at all. Just a portscan on your server and people can find out what port is running what.[/QUOTE] It will help you in that there's less people scanning the full range of ports than people scanning the standard ports. [QUOTE=alrynec;46727257]Really? Some expert in networking told me that others can see if the posts are open or closed but not what is every port running. He might be wrong[/QUOTE] You can match the response on a port to certain software. If you send an HTTP request to port 80 and the response is an HTTP response, it's probably an HTTP server. If the response includes a Server header that says Apache/2.4.10 (Unix), then it's an Apache running on a Unixlike system, or something posing as that.
[QUOTE=DrTaxi;46728202]Well, you can start at home. And if you're either too inexperienced or too lazy to find out how to set up a web server with PHP support using Google, that indicates to me that you're probably not going to secure your servers, install updates etc. I will admit that the default configurations for most servers in most Linux distributions are secure enough by default, but it still takes some care to ensure your systems stay that way. It will help you in that there's less people scanning the full range of ports than people scanning the standard ports. You can match the response on a port to certain software. If you send an HTTP request to port 80 and the response is an HTTP response, it's probably an HTTP server. If the response includes a Server header that says Apache/2.4.10 (Unix), then it's an Apache running on a Unixlike system, or something posing as that.[/QUOTE] I am not lazy to search how to setup a PHP server with Google, before posting here I did research on my own for three days and just found unrelated/outdated posts about it. I just didn't want to setup the whole control panel that's all. Question solved please mods close this post.
[QUOTE=Rocket;46728769]With public-facing servers, you should block all outside access for any service that doesn't need to have it. Block port 3306 for mysql, but leave port 80 open for HTTP, for example.[/QUOTE] Just use a whitelist approach, really. It's easier and especially safer to default to blocking everything and open up ports you need, rather than having everything open and blocking ports you don't want exposed.
[QUOTE=alrynec;46727257]Really? Some expert in networking told me that others can see if the posts are open or closed but not what is every port running. He might be wrong[/QUOTE] He is wrong. It's pretty trivial to probe an open port and guess what software is running from what response you get. If you want to see for yourself, mess around with telnet
Sorry, you need to Log In to post a reply to this thread.