Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Queasy Tiger

Help! I broke my web servers.

Recommended Posts

Posted · Original PosterOP

Hi all!
Okay, so I’m in a predicament and I need help.


I have a pair of ProLiant DL380’s which host my websites, web and cloud services.
My Apache server is the heart of it, enabling all of them, but I’ve recently run into a bit of a problem.
I am not skilled with Linux, or software for that matter, and while I can export to FTP, use simple commands and do some command line work, I focus mainly on harware.
So, I partnered with someone to write code, deploy virtual hosts, and maintain the apache server.
He is already a good friend, so he worked for nothing but the credit for his own site and services at www.csoftware.cf
He has unfortunately fallen on hard times over the last month, and eventually became unable to assist with my servers.
Unable to find someone else to help me who was willing to do it as a favour, I decided to take matters into my own hands, and learn how to make virtual hosts, and all of the other responsibilities that he had.
Big mistake.
My first mistake was not backing up the server files before performing a large change.
My second mistake was messing with it.

Now, I didn’t know about webmin until this happened, and I want to use that when I get this fixed I possible, but I need someone to teach me how to use it.
So, I tried adding a virtual host myself, the old fashioned way in the daunting command line, and in the process managed to break the virtual hosts, and cause the server to crash every time I log into it via ssh or SFTP.
I have all of my sites in /var/www/html backed up, however I haven’t the knowledge to re-deploy the apache server.
This is where I need help.
I need someone that knows enough about Linux, Apache, webmin, and web servers to help me get my services back up and running, and to teach me how to deploy and maintain my servers.
In return, I will offer a VPS with 2 virtual cores, 2-4GB of RAM (You choose), 50GB RAID 10 HDD storage, and unlimited internet bandwidth (Subjective to my broadband speed of 4mb/s download, 0.4mb/s upload.  Yes, it’s awful, but for database storage, ssh into linux, etc, it’s fine.)
If you need to know any more details about my problem, then please ask.  I’m kinda desperate.

My VM for the Apache server is running:
Debian 9.7.0
Apache 2.X

The server is virtualised with VMWare ESXI, which luckily I know how to use.

Thanks in advance!

Link to post
Share on other sites
Posted · Original PosterOP
Just now, mtz_federico said:

What changes did you made? what tutorials did you follow?

Okay let me try and remember.
The first thing I did was try and add a virtual host.  I used the .conf files in etc/apache2/sites-available as a base, and edited them for the new site, with the new domain.
I added an index.html in /var/www/html/www-websitename (/var/www/html contains folders labelled www-sitename)
Then I restarted Apache, and it didn't work.
I tried a few things, before looking on a random forum and finding someone saying that it might work if I removed /var/www/html, and just put the folders in /var/www.
The thread was dead, but I decided to give it a go anyway.

So I did that, and edited the config files accordingly.
Then, it crashed.
And when I tried to reload it, it worked until I navigated a webpage or accessed FTP.
Someone I know who kinda knows linux tried fixing it, and now one site works from all of my domains, but still crashes within 10 minutes of startup.

I am happy to do a fresh installation of Debian.

Link to post
Share on other sites

The easiest thing that you can do is do a backup of your files, the ports, the added libraries ,etc and reinstall apache in a fresh installation of debian.

you could even try redoing it on a vm without moving anything on the other one

Link to post
Share on other sites
Posted · Original PosterOP
1 minute ago, mtz_federico said:

The easiest thing that you can do is do a backup of your files, the ports, the added libraries ,etc and reinstall apache in a fresh installation of debian.

you could even try redoing it on a vm without moving anything on the other one

The issue is, I don't actually know how to set up virtual hosts on an apache server.  I can install apache, and get it working with my network, but making config files etc I can't do.
Also, what library files?
Is there something I missed when trying to make a virtual host before?

Link to post
Share on other sites
Posted · Original PosterOP
Just now, mtz_federico said:

Here is a tutorial that you can check for how to do virtualhost on apache in debian 

https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-debian-8

 

Libraries are like plugins that you can use on apache for added functionality like caching websites on ram for faster access 

Thanks!
I'll check it out, in the meantime to anyone scrolling past, I would like to learn how to use Webmin if you are willing to teach.

Link to post
Share on other sites

VirtualHost.conf files can easily cause apache not to reload if you have bad syntax or configuration. 

 

In future, the REASON you have a sites-available and sites-enabled folder, is that you create your mysite.conf file under the available folder, then use a2ensite <mysite> to enable it, or a2dissite <mysite> to disable it. 

 

If you're doing a big change to a virtualhosts configuration file, then you should make a backup of it first (copy it) so you can roll back. 

 

You should look in your apache log file (/var/log/apache/error.log) and see what errors it's giving. 


Spoiler

Intel i7 3770K @ 4.6ghz | EVGA Z77 FTW | 2 x EVGA GTX1070 FTW | 32GB (4x8GB) Corsair Vengeance DDR3-1600 | Corsair H105 AIO, NZXT Sentry 3, Corsair SP120's | 2 x 256GB Samsung 850EVO, 4TB WD Black | Phanteks Enthoo Pro | OCZ ZX 1250w | Samsung 28" 4K Display | Ducky Shine 3 Keyboard, Logitech G502, MicroLab Solo 7C Speakers, Razer Goliathus Extended, X360 Controller | Windows 10 Pro | SteelSeries Siberia 350 Headphones

 

Spoiler

Corsair 400R, IcyDock MB998SP & MB455SPF, Seasonic X-Series 650w PSU, 2 x Xeon E5540's, 24GB DDR3-ECC, Asus Z8NA-D6C Motherboard, AOC-SAS2LP-MV8, LSI MegaRAID 9271-8i, RES2SV240 SAS Expander, Samsung 840Evo 120GB, 2 x 8TB Seagate Archives, 12 x 3TB WD Red

 

Link to post
Share on other sites
48 minutes ago, Jarsky said:

VirtualHost.conf files can easily cause apache not to reload if you have bad syntax or configuration. 

 

In future, the REASON you have a sites-available and sites-enabled folder, is that you create your mysite.conf file under the available folder, then use a2ensite <mysite> to enable it, or a2dissite <mysite> to disable it. 

 

If you're doing a big change to a virtualhosts configuration file, then you should make a backup of it first (copy it) so you can roll back. 

 

You should look in your apache log file (/var/log/apache/error.log) and see what errors it's giving. 

Good points, check the syntax and the log files

Link to post
Share on other sites
On 5/14/2019 at 12:39 PM, Queasy Tiger said:

Hi all!
Okay, so I’m in a predicament and I need help.


I have a pair of ProLiant DL380’s which host my websites, web and cloud services.
My Apache server is the heart of it, enabling all of them, but I’ve recently run into a bit of a problem.
I am not skilled with Linux, or software for that matter, and while I can export to FTP, use simple commands and do some command line work, I focus mainly on harware.
So, I partnered with someone to write code, deploy virtual hosts, and maintain the apache server.
He is already a good friend, so he worked for nothing but the credit for his own site and services at www.csoftware.cf
He has unfortunately fallen on hard times over the last month, and eventually became unable to assist with my servers.
Unable to find someone else to help me who was willing to do it as a favour, I decided to take matters into my own hands, and learn how to make virtual hosts, and all of the other responsibilities that he had.
Big mistake.
My first mistake was not backing up the server files before performing a large change.
My second mistake was messing with it.

Now, I didn’t know about webmin until this happened, and I want to use that when I get this fixed I possible, but I need someone to teach me how to use it.
So, I tried adding a virtual host myself, the old fashioned way in the daunting command line, and in the process managed to break the virtual hosts, and cause the server to crash every time I log into it via ssh or SFTP.
I have all of my sites in /var/www/html backed up, however I haven’t the knowledge to re-deploy the apache server.
This is where I need help.
I need someone that knows enough about Linux, Apache, webmin, and web servers to help me get my services back up and running, and to teach me how to deploy and maintain my servers.
In return, I will offer a VPS with 2 virtual cores, 2-4GB of RAM (You choose), 50GB RAID 10 HDD storage, and unlimited internet bandwidth (Subjective to my broadband speed of 4mb/s download, 0.4mb/s upload.  Yes, it’s awful, but for database storage, ssh into linux, etc, it’s fine.)
If you need to know any more details about my problem, then please ask.  I’m kinda desperate.

My VM for the Apache server is running:
Debian 9.7.0
Apache 2.X

The server is virtualised with VMWare ESXI, which luckily I know how to use.

Thanks in advance!

If you're not all that good with Linux, I may recommend installing Plesk Oynx, it's cheap, it's got a web interface, and it doesn't really suck.

Link to post
Share on other sites
Posted · Original PosterOP
7 hours ago, mikegeek said:

If you're not all that good with Linux, I may recommend installing Plesk Oynx, it's cheap, it's got a web interface, and it doesn't really suck.

At £7.20 a month, I might be able to start using it once I get a new job.
Without a stable source of income however, I cannot afford even that small amount.  With that and College, I'm a bit stuck at the moment.
Thanks for the suggestion though, I had been looking at Plesk as an option but was unsure.
I'll definitely give it a go as soon as I can.

Link to post
Share on other sites
Posted · Original PosterOP
7 hours ago, mikegeek said:

If you're not all that good with Linux, I may recommend installing Plesk Oynx, it's cheap, it's got a web interface, and it doesn't really suck.

How is Webmin compared to Plesk?
Because on lots of "Top 10 Cpanel alternative" lists it comes up as good, but the user interface makes my head spin.

Link to post
Share on other sites

Honestly if you're going to continue doing this yourself I would just run LAMP or even better if you have a windows license, WAMP. cPanel and similar are good if you are reselling web hosting. It's enough to learn apache let alone learning linux when it isn't for a fun project - so I would err more towards windows / WAMP.

 

Unfortunately what you're offering in compensation is pretty close to free tiers from other companies - for what may end up being a lot of work / training. I would look at how much electricity to run those servers + their value and think about paying for hosting online. If it's just a few websites, you can get webhosting for $40/yr - which is way cheaper than most electricity bills.

Link to post
Share on other sites
Posted · Original PosterOP
On 5/20/2019 at 5:38 PM, Mikensan said:

Honestly if you're going to continue doing this yourself I would just run LAMP or even better if you have a windows license, WAMP. cPanel and similar are good if you are reselling web hosting. It's enough to learn apache let alone learning linux when it isn't for a fun project - so I would err more towards windows / WAMP.

 

Unfortunately what you're offering in compensation is pretty close to free tiers from other companies - for what may end up being a lot of work / training. I would look at how much electricity to run those servers + their value and think about paying for hosting online. If it's just a few websites, you can get webhosting for $40/yr - which is way cheaper than most electricity bills.

I do have a Windows Server 2016 licence, but I have tried using WAMP with no success.  Usually errors or things simply not working.
And that's the other thing, I do want to offer VPS hosting, free.
No, there is no profit to be made in it, but it's a hobby, and the amount of people that ask me for a site or VPS (Mostly family and friends) is staggering, so I really want to try and get it to work.
My parents pay the electricity bill luckily, so I don't lose anything either.
And I understand about what I'm offering being somewhat pitiful, but I have a DL380 g6, and a DL380 G5, so resources are kinda tight....

At the very least, I want to be able to host sites.  I cheat and use a drag and drop builder, but that's not the point.  I have 2 people who want digital portfolio's for their art in college, and i'm at a dead end...
I can't afford hosting, I got my servers for under £100.

Link to post
Share on other sites
2 hours ago, Queasy Tiger said:

I do have a Windows Server 2016 licence, but I have tried using WAMP with no success.  Usually errors or things simply not working.
And that's the other thing, I do want to offer VPS hosting, free.
No, there is no profit to be made in it, but it's a hobby, and the amount of people that ask me for a site or VPS (Mostly family and friends) is staggering, so I really want to try and get it to work.
My parents pay the electricity bill luckily, so I don't lose anything either.
And I understand about what I'm offering being somewhat pitiful, but I have a DL380 g6, and a DL380 G5, so resources are kinda tight....

At the very least, I want to be able to host sites.  I cheat and use a drag and drop builder, but that's not the point.  I have 2 people who want digital portfolio's for their art in college, and i'm at a dead end...
I can't afford hosting, I got my servers for under £100.

What problems were you having with WAMP? By default you just drag your website into the wwwroot folder and it works. I ran it for a little while and might be able to at least help you with that. Though I would need to do a little bit of light reading to refresh myself on apache virtual hosts but I don't remember it being overly complex. 

 

For VPS and resources I would consider creating docker containers for those people (assuming they're looking for linux environments) to help you save on resources and something fun to learn.

 

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×