Linux Apaheのインストール

Ubuntu にApache2をインストールします。目的は、pythonCGIを作るためです。

 

まずは、Apacheをインストールします。

sudo apt-get install apache2

ついでにDeveloperツールもインストールします。

sudo apt-get install apache2-dev

 

今回の目的であるmod_wsgiをインストールします。

1
sudo pip install mod_wsgi
 
 
 

動作確認するために、mod_wsgi-express start-server

で確認。

$ mod_wsgi-express start-server
Server URL : http://localhost:8000/
Server Root : /tmp/mod_wsgi-localhost:8000:1000
Server Conf : /tmp/mod_wsgi-localhost:8000:1000/httpd.conf
Error Log File : /tmp/mod_wsgi-localhost:8000:1000/error_log (warn)
Request Capacity : 5 (1 process * 5 threads)
Request Timeout : 60 (seconds)
Startup Timeout : 15 (seconds)
Queue Backlog : 100 (connections)
Queue Timeout : 45 (seconds)
Server Capacity : 20 (event/worker), 20 (prefork)
Server Backlog : 500 (connections)
Locale Setting : en_US.UTF-8

 

起動方法

まずは既存のApacheを停止

/etc/init.d/apache2 stop

  sudo mod_wsgi-express start-server --port 80 --user fujimo --group fujimo

 で起動ができました。