ポート88でリッスンするサイト

ポート88でリッスンするサイト

サイトの 1 つをポート 88 でリッスンするようにしたいです。

Ubuntu サーバーの /etc/apache2 の ports.conf に、Web アプリがポート 88 でリッスンできるように以下を追加します。

NameVirtualHost *:80
Listen 80

NameVirtualHost *:88
Listen 88

私の etc/apache2/apache2.conf には、次の内容があります:

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

有効なサイトの下に、次のようなファイルがあります。

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>

次に、Apache を再起動してみます。

/etc/init.d/apache2 restart

そして私はこう得ます:

* 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.

答え1

同じ IP アドレス/ポートの組み合わせに対して2 つのディレクティブがありますListen。 2 番目のディレクティブは失敗し、Apache は起動できません。

また、sudoApache を再起動しましたか?

権限エラーを見ると、そうではないと思われます。

関連情報