Apache restart after source changes

F

Fredrik Bertilsson

I am evaluating Python for web development and just found out that I need to restart Apache after source changes on windows. Using linux the situationis better but I still have to touch the wsgi file. Is it only me that finds this being a major drawback compared to PHP?
 
E

Eduardo A. Bustamante López

I am evaluating Python for web development and just found out that I need to restart Apache after source changes on windows. Using linux the situation is better but I still have to touch the wsgi file. Is it only me that finds this being a major drawback compared to PHP?
How is it a «major drawback». «Oh, god, I have to touch that file!
This is unbearable! It's unbeliavable!!! How awful».

Also, it's not a python issue, it's an issue with your particular
stack. Other stacks do automatic reloading (for example, the web
server that Django uses).
 
F

Fredrik Bertilsson

Also, it's not a python issue, it's an issue with your particular
stack. Other stacks do automatic reloading (for example, the web
server that Django uses).

Which web server do you suggest instead of Apache, which doesn't have this problem? (I am not planning to use Django)
 
C

Chris “Kwpolska†Warrick

Which web server do you suggest instead of Apache, which doesn't have this problem? (I am not planning to use Django)

It depends. Some other frameworks (like Flask) also offer auto-reload
in debug mode — auto-reload can be bad for you and is not supportedby
production environments, in which uWSGI (in Emperor mode if
possible/makes sense on Windows) and nginx is the best solution
around, and auto-reload isn’t supported (for good reasons, as
mentioned before).
 
N

Ned Batchelder

I am evaluating Python for web development and just found out that I need to restart Apache after source changes on windows. Using linux the situation is better but I still have to touch the wsgi file. Is it only me that finds this being a major drawback compared to PHP?

In general, PHP is more tightly integrated into web servers than Python
is. Python's advantages are 1) a more disciplined and carefully planned
language and standard library, and 2) a larger and broader ecosystem of
libraries, especially for tasks not directly related to serving web pages.

As to restarting servers after source changes: most people do not change
file directly on their production servers. They develop on their own
machines, test the code, then deploy it to a production server. In this
scenario, restarting the web server is not a burden.

I don't know what the options are for auto-restarting the kinds of web
servers you'd use in production, I'm sure there are some. Someone here
mentioned the Django web server, but that isn't intended for production use.
 
D

diverman

In development environment I suggest to use build-in webserver from wsgirefmodule, see http://docs.python.org/2/library/wsgiref.html#examples

Then it's easy to run webserver in console and kill&start it with Ctrl+C keystroke. In production environment, use your prefered webserver like apache,nginx etc...

Dne Ätvrtek, 26. prosince 2013 7:36:45 UTC+1 Fredrik Bertilsson napsal(a):
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top