Server Deployment - lighttpd
1. Install the software
>sudo apt-get install lighttpd
2. proxy configuration
>vi /etc/lighttpd/lighttpd.conf
server.modules = (
"mod_access",
"mod_proxy",
"mod_alias",
"mod_compress",
"mod_redirect",
# "mod_rewrite",
"mod_accesslog"
)
#this can change the port
server.port=83
#$HTTP["host"] == "localhost"{
$SERVER["socket"] == "localhost:83"{
proxy.balance="hash"
proxy.server = ( "/easymarket" => (
( "host" => "127.0.0.1", "port" => 8083),
( "host" => "127.0.0.1", "port" => 8084),
( "host" => "127.0.0.1", "port" => 8085)
)
)
}
I can not do it successfully on port 83. So I change to 80 port
#this can change the port
#server.port=83
$HTTP["host"] == "localhost"{
#$SERVER["socket"] == "localhost:83"{
proxy.balance="hash"
proxy.server = ( "/easymarket" => (
( "host" => "127.0.0.1", "port" => 8083),
( "host" => "127.0.0.1", "port" => 8084),
( "host" => "127.0.0.1", "port" => 8085)
)
)
}
restart the server:
>/etc/init.d/lighttpd restart
3. run with perl
>vi /etc/lighttpd/lighttpd.conf
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm","index.pl","index.py",
"index.lighttpd.html" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".pl", ".cgi", ".py" )
cgi.assign = ( ".pl" => "/usr/bin/perl",
".cgi" => "/usr/bin/perl",
".py" => "/usr/bin/python",)
link the /var/www/easyperl to my work directory
>sudo ln -s /home/luohua/work/easyperl /var/www/easyperl
Verify the page in this URL:
http://localhost/easyperl/All.pl
4. run with python
pytest.py:
#!/usr/bin/python
print "hello world"
Verify the page in this URL
http://localhost/pytest.py
references:
http://hi.baidu.com/luohuazju/blog/item/fd57db90876dba88a977a4af.html
http://blog.liuts.com/post/56/
分享到:
相关推荐
Lync-Server-2010-RTM-Standard-Edition-Deployment-Document.pdf
Lync-Server-2010-RTM-Enterprise-Edition-Deployment-Document.pdf
Black Belt HyperFlex Deployment - Stage1 是思科在2019年6月为合作伙伴推出的一项高级认证考试。这个题库是针对那些希望深入理解和熟练掌握HyperFlex解决方案部署的专业人士所设计的。HyperFlex是思科的一种超融合...
本文将深入探讨如何使用"alfresco-deployment-484-2.9.3B.jar.zip"这个压缩包进行Alfresco的部署,以及其中的"alfresco-deployment-484-2.9.3B.jar"文件在部署过程中的关键作用。 首先,我们要明确"jar"文件的含义...
**前端开源库-esh-deployment-cloud** 在当前的IT领域,前端开发已经成为互联网产品不可或缺的一部分。随着技术的不断发展,各种前端框架和库层出不穷,极大地提高了开发效率和用户体验。"前端开源库-esh-...
DigitalOcean-Nodejs-Deployment--源码.rar
maven-deployment-linker-1.3-sources.jar
maven-deployment-linker-1.2-sources.jar
maven-deployment-linker-1.1-sources.jar
maven-deployment-linker-1.0-sources.jar
deployment-ucc-service.yml
maven-deployment-linker-1.2.jar
maven-deployment-linker-1.1.jar
maven-deployment-linker-1.0.jar
VMware-View4-Deployment-Guide-Q309.pdf
Accelerate-Deployment-of-Space-Missions-Through-Digitalization (10).pdf
Accelerate-Deployment-of-Space-Missions-Through-Digitalization (7).pdf
Accelerate-Deployment-of-Space-Missions-Through-Digitalization (8).pdf
nexus-deployment-pod.yaml
[RT-CN]Exchange_Deployment-Migration-Hybrid-Mgmt-TechDeck.pptx