Take the 2-minute tour ×
Server Fault is a question and answer site for professional 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
add comment

2 Answers 2

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 Lawrie 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
add comment

Does the IP address you are using match the one shown by ifconfig? If so, can you ping it?

share|improve this answer
1  
I have everything setup, it's jsut getting the port based addresses to work that's the problem. I can access myserverip and it resolves however, accessing myserverip:8080 won't... –  jonraw Aug 6 '10 at 8:39
    
Is the application listening on those ports? Can you telnet to them? –  James Lawrie Aug 6 '10 at 8:54
    
Sorry James, I don't have a clue how to telnet :/ –  jonraw Aug 6 '10 at 8:56
    
Did I mention that I was a newbie? I am playing around with the Apache config at the minute though... Managed to get it to listen on port 8080, however just trying to get it to load the correct folders etc –  jonraw Aug 6 '10 at 9:11
    
An issue I seem to be getting now is this when trying to create an address of myserverip:8081. (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 Not really sure what this means :( –  jonraw Aug 6 '10 at 9:39
show 4 more comments

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.