配置apache2服务器以提供应用程序

时间:2015-03-13 11:22:04

标签: apache python-2.7 ubuntu

我已经设置了一个源存档,我需要apache 2来提供应用程序。以下是README文件的内容:

  

所以,您有源存档可用,并安装在某处。   接下来设置一个Web服务器,并将其配置为提供应用程序   从任何地方,使用文件sample-apache2.conf作为基础。

以下是**

的内容

样品apache2.conf

与README文件一起提供的

**文件:

#
# In this example, the site is served directly from a dedicated virtualhost
#

# static content, such as images, css, etc
#Alias /static /home/seanius/patch-tracker/static
# a custom error page
#ErrorDocument 500 /static/500.html
# all other requests go through a central handler
#WSGIScriptAlias / /home/seanius/patch-tracker/pagehandler.py
#<Location />
#  WSGIProcessGroup patch-tracker
#</Location>

#
# In this example, the site is served relatively from the location
# /patch-tracking.debian.net on the default virtualhost/server
#

# static content, such as images, css, etc
Alias /patch-tracking.debian.net/static /home/seanius/patch-tracker/static
# a custom error page
ErrorDocument 500 /patch-tracking.debian.net/static/500.html
# all other requests go through a central handler
WSGIScriptAlias /patch-tracking.debian.net /home/seanius/patch-tracker/pagehandler.py
<Location /patch-tracking.debian.net>
  WSGIProcessGroup patch-tracker
</Location>


# and finally: an optional (highly recommend) config to run as a dedicated user
WSGIDaemonProcess patch-tracker user=patch-tracker group=patch-tracker processes=2 threads=10 maximum-requests=1000 umask=0022 display-name=patch-tracker

我引用了以下网站,但无法弄清楚如何配置服务器: https://www.digitalocean.com/community/tutorials/how-to-configure-the-apache-web-server-on-an-ubuntu-or-debian-vps

有人可以告诉我如何配置apache服务器吗? (我使用的是ubuntu 12.04 LTS作为操作系统)

编辑(进一步澄清我的疑问):我有一个源存档,Web应用程序是用python编写的。应用程序中有python文件处理Web请求和响应以及其他所有内容。我希望我的apache服务器以某种方式运行python文件,当有人想连接到服务器时(在我的情况下,它是localhost)。这是我无法弄清楚的。

0 个答案:

没有答案