APACHE_RUN_USER=$USER APACHE_RUN_GROUP=www-data apache2 -d ~/Desktop/ -c "Listen 2990"
Is there a better solution, could I do something similar with nginix or lighttpd?
Note:
The above won't work correctly for stock environments without a copied & altered httpd.conf.
Update:
The ideal goal is to mimic Paster, Webbrick, and Mongrel for rapid local development hosting. For those light weight servers, it takes less then a minute to get a working instance running ( not factoring any DB support ). Apache2 vhost is great but I've been using Apache2 for over ten years and it would be some sort of abomination hack to setup a new entry in /etc/hosts unless you have your own DNS, in which case a wildcard subdomain setup would probably work great. EXCEPT one more problem, it's pretty easy for me to know what is being hosted ( ex. by paster or mongeral ) just doing a sudo netstat -tulpn while there would be a good possibility of confusion in figure out which vhost is what.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
您看过nanoweb吗?看起来它可能符合您的要求:
注意: 我还没有尝试过我自己,我很高兴使用 apache,但我想我应该传递信息
Have you looked at nanoweb? It looks like it might fit your requirements:
Note: I haven't tried it myself, I'm pretty happy using apache, but I thought I'd pass the info along
如果您正在寻找一个轻量级解决方案只是来节省自己的时间,我建议您不应该这样做。
如果您在开发机器时坚持使用 ol' LAMP 软件包,那么您可以节省时间,并且可能会解决很多很多的麻烦。
If you're looking for a lightweight solution only to save yourself time, I suggest you shouldn't.
You save time and probably lots and lots of headaches if you stick to the ol' LAMP software packages when it comes to development machines.
Apache 2.x 文档中的动态配置的海量虚拟主机可能是回答你的问题。
我同意开发配置应该尽可能接近生产环境。
Dynamically Configured Mass Virtual Hosting from Apache 2.x documentation may be an answer to your question.
I agree that development configuration should be as close as possible to production environment.
http://code.google.com/p/phpmvchelpers/wiki/script_serve
这就是我想要实现的目标,我编写的黑客并不完美,但它很实用。需要几个小时的工作来拨入重写规则和一些更多的温习工作,但它对于 Kohana 和 Kohana 来说是有用的。 CakePHP...不过仍在研究 Recess 框架。
http://code.google.com/p/phpmvchelpers/wiki/script_serve
This is what I was looking to accomplish, the hack I made up isn't perfect but its functional. Needs a couple more hours work to get the re-write rules dialed in and some more brush up work but its functional for Kohana & CakePHP... still working on Recess framework though.