Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to setup virtual hosts in the respect that everything is in the /var/www/html/ root folder however, I am trying to setup folders within that and then setup port related url's.

  • myserverip - Would get the local intranet
  • myserverip:8181 - Would get my personal website
  • myserverip:8080 - Would get the intranet blog etc

I tried setting these up through webmin, however they just won't resolve. I disabled the Linux Firewall, as it's on a local intranet and will NEVER have remote access / public access from the internet. Our local intranet is completely locked down.

Does anyone have any suggestions with this as I have got to the point where I am just clutching at straws :(

Thanks for your time, if I manage to get any further, I will edit this post so that you have further information. Please understand I am a server newbie :(.


Below is what is inside the httpd.conf file

Listen 80
Listen 8080
Listen 8081

NameVirtualHost *:80
NameVirtualHost *:8080
NameVirtualHost *:8081

<VirtualHost *:80>
        ServerName SERVERIPHERE
        DocumentRoot /var/www/html/
</VirtualHost>

<VirtualHost *:8080>
        ServerName SERVERIPHERE
        DocumentRoot /var/www/html/example2
</VirtualHost>

<VirtualHost *:8081>
        ServerName SERVERIPHERE
        DocumentRoot /var/www/html/example3
</VirtualHost>

And this is the error returned

Starting httpd: (13)Permission denied: make_sock: could not bind to address [::]:8081
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:8081
no listening sockets available, shutting down
Unable to open logs
share|improve this question
    
Does the IP address you are using match the one shown by ifconfig? If so, can you ping it? –  James L Aug 6 '10 at 8:32

1 Answer 1

up vote 1 down vote accepted

I think it could be selinux in enforcing mode, httpd is not allowed to listen to port 8081, check /var/log/audit/audit.log

share|improve this answer
    
It doesn't want to work on any other port either :/ Only seem to work on the default :80 port and :8080... –  jonraw Aug 6 '10 at 10:04
    
Good point - type "getenforce" and see if it says enforcing –  James L Aug 6 '10 at 11:22
    
Yes it's Enforcing, so how would I go about stopping that? –  jonraw Aug 6 '10 at 11:30
    
No worries, I actually went to the box and changed it via the gui... Will let you know shortly IF it has fixed the issue :) Thanks –  jonraw Aug 6 '10 at 11:34
    
Yep... That fixed it guys... Thank you so much... I can't 1 up at the minute due to newbie status. –  jonraw Aug 6 '10 at 11:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.