TurnKey Linux Virtual Appliance Library

LAMP stack - Apache not responding?

Graham Hunter's picture

I've installed the LAMP stack and everything seems to be working correctly except the Apache server.  I can access Shell In A Box, PHPMyAdmin, and Webmin.  However, Apache is not responding on port 80 and when I create a new Virtual Host on port 12323 it doesn't respond either.

Could someone please help me with to some troubleshooting steps?

Thanks!

Basil Kurian's picture

Paste here the outputs of

# netstat -ntlp

 

# apachectl configtest
# apachectl -S

When we create new virtualhost on a different port , we need to add a new directive

Listen 12323

in /etc/apache2/ports.conf . Did you add that ?


Graham Hunter's picture

Webmin enhancement?

First, thank you for your quick response and for helping me solve this problem.

I did not know about adding that entry into ports.conf.  I assumed that the Webmin interface would do that for me when I added the new Virtual Host.  Is there an enhancement queue for Webmin?

I added that line to ports.conf and restarted Apache using this command:

apache2ctl -k restart

That worked perfectly, and my server is now responding as expected.

Jeremy's picture

From memory you can edit ports.conf in Webmin too

But it probably should at least be clearer that you have to do that. Perhaps TKL could look at adding some warning text to the Apache vhosts page in Webmin. Better still it would be awesome if it took care of that automatically if you add a virtual server with a non standard port. I think it's definately worth suggesting upstream to the Webmin devs.

Or if someone familiar with Perl wants to have a crack I'm sure the Wemin team would love to hear from you! 

Graham Hunter's picture

Webmin doesn't do globals

I was looking around the webmin console more last night and it seems like although it will let you edit an instance configuration it won't let you edit the global config files.

I also changed the SSH port to 12323, it would be nice if webmin also let the user know what processes need to be restarted to make that work - I rebooted the entire mahine to make that work.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)