logo
Apache Lounge
Webmasters

 


About

Forum Index Downloads Search Register Log in  RSS Apache Lounge
 


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.



Problem with virtual host config

 
Post new topic   Reply to topic    Apache Forum Index -> Apache



View previous topic :: View next topic  
Author Message
mikewooz



Joined: 15 Nov 2018
Posts: 4
Location: USA, Radcliff

PostPosted: Wed 05 Jun '19 23:37    Post subject: Problem with virtual host config Reply with quote

Hello everyone. I am trying to setup my LAMP stack... I've made it to the A part, haha, but am currently at a hurdle. When I attempt to log into one or the other web site, I am unable to access the site. I followed a couple tutorials, one on Digital Ocean and another on LowEndBox. I created 2 different directories under /var/www/ and I created 2 separate .conf files for the 2 websites. I reloaded after setting up my .conf files and while everything seems correct, I'm not able to login.

If there is someone willing to help me out, I would appreciate it greatly. I had a similar problem a few months ago where I just hung up the towel, but I don't want to do that anymore as I want a fully functioning web server.

Thanks a million,
Mike
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6600
Location: Germany, Next to Hamburg

PostPosted: Thu 06 Jun '19 14:13    Post subject: Reply with quote

Quote:
I'm not able to login


What does this mean? What are you expecting to see? Do you see a wring virtual host? See nothing? See a blank page?
Back to top
mikewooz



Joined: 15 Nov 2018
Posts: 4
Location: USA, Radcliff

PostPosted: Thu 06 Jun '19 16:19    Post subject: Reply with quote

James, when I type in my server IP address in the browser, I see the Apache default page. When I type my www.digioffice.com into the browser, I get server ip address cannot be found. I have edited the /etc/hosts file by adding both of the websites I'm trying to configure. Per several tutorials, I added 2 lines with my ip address and then the dummy domain names.

Also, most of the tutorials have you "a2dissite" the default and "a2ensite" the virtual sites. It is not a problem, BUT why is it necessary to leave the default site up? Why can't you just leave it up as a fallback?

In my sites-available folder, I can see the default and 2 additional sites I'm trying to serve.

I can see the 3 sites in the sites-enabled if I "a2ensite" them and also they are gone if I "a2dissite" them. The only thing that I am possibly picking up is I might need to go into the /etc/apache2/apache2.conf file and edit some things. HOWEVER, I also saw where some said that you NEVER EVER edit this file as Apache will make the necessary edits automatically.

It seems these tutorials are flawed in some ways as I don't think I should be having these kinda of problems. When I write technically, I usually assume the recipient does not know ANY of the steps to make the desired proccess work... meaning I believe there are likely some assumptions that should not be left out with each tutorial.

Long story short, I believe I'm ALMOST there, but need a couple different settings adjusted to make this work for me.

Thanks for your response and have a great day.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6600
Location: Germany, Next to Hamburg

PostPosted: Tue 11 Jun '19 13:20    Post subject: Reply with quote

After a2ensite did you restart apache?

Can you ping the domain name on the command line / terminal?

also
sudo /usr/sbin/httpd -S

or

sudo /usr/sbin/apache2 -S

will do a config test including a check of your vhosts.
Back to top


Post new topic   Reply to topic    Apache Forum Index -> Apache
Page 1 of 1