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 want to get one of my sites to listen on port 88.

In ports.conf in /etc/apache2 on ubuntu server, I add so web app can listen on port 88:

NameVirtualHost *:80
Listen 80

NameVirtualHost *:88
Listen 88

I have this in my etc/apache2/apache2.conf, I have this:

# Include the virtual host configurations:
Include sites-enabled/

Under sites enabled, I have a file looks like this:

Listen *:88

NameVirtualHost *:88

<VirtualHost *:88>
  ServerName dogtracking.com
  DocumentRoot /home/doggps/public_html/eaglegps.com/current/public
  <Directory /home/doggps/public_html/eaglegps.com/current/public>
    AllowOverride all
    Options -MultiViews
  </Directory>

  <LocationMatch "^/assets/.*$">
    Header unset ETag
    FileETag None
    # RFC says only cache for 1 year
    ExpiresActive On
    ExpiresDefault "access plus 1 year"
  </LocationMatch>
</VirtualHost>

Then I try to restart apache:

/etc/init.d/apache2 restart

And I get:

* Restarting web server apache2                                                                                                                                                                                           /usr/sbin/apache2ctl: line 87: ulimit: open files: cannot modify limit: Operation not permitted
Warning: DocumentRoot [/home/xtreme/Sites/DogGPS-CMS] does not exist
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Thu Oct 18 18:04:21 2012] [warn] NameVirtualHost *:88 has no VirtualHosts
/usr/sbin/apache2ctl: line 87: ulimit: open files: cannot modify limit: Operation not permitted
Warning: DocumentRoot [/home/xtreme/Sites/DogGPS-CMS] does not exist
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Thu Oct 18 18:04:22 2012] [warn] NameVirtualHost *:88 has no VirtualHosts
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
share|improve this question
    
What method did you use to install Apache, and have you modified its init script? Those permissions errors are interesting. Aside from that, can you provide the output of apachectl -S? –  Shane Madden Oct 18 '12 at 22:12
2  
I don't think Listen *:88 is valid syntax. Also, port 88 is kerberos. Probably not best practice to use reserved ports for websites. What is your motive behind not using port 80? –  Kyle Smith Oct 18 '12 at 23:04

1 Answer 1

You have two Listen directives for the same IP address/port combination. The second one will fail and Apache won't be able to start.

Also, did you use sudo to restart Apache?

The permission errors make me think you didn't.

share|improve this answer

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.