How to install mod_wsgi from lfd in 2015 - mod-wsgi

How can I install mod_wsgi from lfd website as it has wheel extension.Whenever I am searching how to install mod_wsgi on wamp the resources tell me to install binary from this site and then keep the mod_wsgi.so file in my wamp directory.

On the lfd page is a link to:
https://github.com/GrahamDumpleton/mod_wsgi/blob/master/win32/README.rst
You may want to read that.
The official mod_wsgi download area has binaries as .so files as explained in that link.
You can still use the whl versions when you work out how to install them, but the .so option does still exist.

The WHL files from LFD (http://www.lfd.uci.edu/~gohlke/pythonlibs/#mod_wsgi) DO contain the pre-built WSGI module, but for obscure reasons it is called mod_wsgi.pyd. You can find it in c:/python27/lib/site-packages/mod_wsgi/server/ (or whatever your Python installation or virtual environment path is).
Just rename it to mod_wsgi.so and copy it to the modules directory if Apache.
To get some initial help with setting up the Apache configuration, you may run
c:/python27/Scripts\mod_wsgi-express.exe module-config
More information about mod_wsgi on Windows and compatibility can be found here: https://github.com/GrahamDumpleton/mod_wsgi/blob/master/win32/README.rst

Related

How to get mod_jk.so/mod_jk.dll file for windows?

I am configuring httpd in windows server for load balancing. One of the step in configuration is to download tomcat connector for windows and put mod_jk.so file into modules folder.
I downloaded latest connector of windows from https://tomcat.apache.org/download-connectors.cgi
But after extracting, I could not find this file. I found some steps to build it on some sites, but those steps are of linux environments.
How to get mod_jk.so for windows environment ?
If you want mod_jk for Windows/httpd, then you should get it from the same place you got your binary distribution of httpd.
You probably got it from ApacheLounge, which BTW is not directly-affiliated with the Apache Software Foundation, but has been providing Windows binaries for quite some time and seems to be reputable. YMMV.

XAMPP Can't Start Apache After Upgrading to PHP7.1.17 "Attempting to start Apache service..."

I have XAMPP installed on Windows 7 virtual machine. My old PHP version was 7.0.9 with Apache 2.4
I needed to upgrade the PHP version to 7.1.x and I set out reading about how to best to this. In end, I settled with the simple plan:
Stop Apache service
Downloaded new PHP version from official php website. For PHP 7 the 7.1.17 version was listed. I downloaded the thread safe version, as my Apache has thread safety enabled.
I extracted the contents of the downloaded archive to a folder.
I copied and replaced all files in the appropriate folders from C:/Server/php with the new php version files from the extracted archive.
I attempted to start Apache from the XAMPP control panel and the server will not start.
The message "Attempting to start Apache service..." just hangs and nothing happens.
The last entry in the error.log file in C:\Server\apache\logs shows the event when the server was stopped and that's it.
When I check the php version from CLI with the command php -v, the console returns installed php version 7.1.17
I tried different suggestions I read from similar questions, like changing ServerName localhost:80 to ServerName localhost:8080 and copying php7apache2.dll to apache/bin ( as suggested here: Upgrading PHP in XAMPP for Windows? ), alas the issue is not fixed and Apache does not start.
Of course, I also restarted the virtual machine, all the same.
At this point, I'm dumbfounded. Don't know what to do.
I need to get Apache running with php 7.1, as it is required by Magento 2.2.4. I do not want to reinstall XAMPP, as this will be a lenghty process with a lot of risk for more things to go wrong.
Any help is much appreciated!
Alright, so after checking Windows Logs > Application in Event Viewer I saw the error ".. the Apache service named is not a valid win32 application". I downloaded the x86 version of PHP from official website PHP for Windows
Then copied and replaced files as described above, and Apache started successfully.
To see if your Apache version is x64 or x86 open command prompt and cd to your Apache bin directory, in my case C:/Server/apache/bin , then run:
file httpd

Installing openCPU with exotic path to Apache

I am installing OpenCPU on a production RedHat 7 Server and it turned out that the path to their Apache server is not
/etc/httpd
but something else.
Apparently, OpenCPU was still referring to /etc/httpd and therefore did not work.
I am wondering if there is a way to specify custom path to Apache server for OpenCPU installation (as a parameter for installation, or somewhere in the code, or after installation)?
OpenCPU version is 2.0.7, RedHat version is 7.3, Apache server version is 2.4
Where is your Apache2 located then? Did you compile it from source?
OpenCPU depends on httpd via rapache (which has mod_R). The rApache manual has some docs about how to compile rapache from source against a custom version of R or Apache.
Once this works you can try to build OpenCPU. The default opencpu-server rpm spec is copies opencpu.conf into /etc/httpd because that is the path of the httpd package in Fedora or Enterprise Linux. I guess you could modify that if you run a non-standard version of httpd.

How to upgrade Apache on a Windows server?

I have just upgraded our webserver from PHP 5.3.6 to 5.3.10, and I now want to upgrade Apache as well from 2.2.17 to 2.2.22 (on a Windows Server). How do I go about this in a good way (on a live webserver)? A little downtime is alright, but not too much.
Apache is installed via an MSI installer and I'm not sure how to upgrade safely with the least downtime.
Do I just download the latest installer and install that? And what about my config files? I don't think it's possible to have both instances installed 'next to each other'? Or is it?
For anyone else who searches for this, I found that uninstalling the old Apache (in my case, 2.2.22) from Add/Remove Programs and installing the new version (in my case, 2.2.24) kept all the previous settings.
We had locked down the httpd.conf file and had an application that modified/added files in the "htdocs" directory.
Upon uninstalling and re-installing, all of these files were left unchanged and the new version of Apache Server is reflected.
Download a latest version of apache installer.
Make the necessary config changes.
Run it on a different port, other than your live server.
If things work well, correct the port number, and replace.
It will really take a little down-time.
I did it today on windows server 2012R2, apache was installed from "source" (installer was not used-updated to 2.4.55):
1.Stop apache service
2.Rename apache directory (from C:\Apache24 to C:\Apache24-old)
3.Extract Apache24 folder from zip archive downloaded from apache web site to original location (C:\)
4.Copy conf folder from previous installation to the extracted folder (Copy C:\Apache24-old\conf to C:\Apache24\conf-overwrite)
5.(Optional), if you have any certs copy it from C:\Apache24-old\ to C:\Apache24
6.Start apache service,no issues faced

Uninstalling user install of Apache on Mac Mini

I got a MacMini at work for development, and was asked to follow this article to install SVN on it: http://developer.apple.com/tools/subversionxcode.html The article assumes that only Apache 1.3 was installed and asks the reader to install Apache 2. I've since learned that the MacMini has Apache 2 already installed. So basically I've installed two versions of Apache 2. The preinstalled one has access to PHP, so I wanted to remove my version, but I'm unsure of how.
My version has httpd.conf stored at:
/usr/local/apache2/conf/httpd.conf
And the preinstalled version has it stored at:
/etc/apache2/httpd.conf, which I believe is an alias for /private/etc/apache2/httpd.conf
Thanks for your help
Delete the Apache2 folder from the location you specified, /Library/StartupItems/Apache2, and /Library/Receipts/Apache2.pkg according to:
http://www.glinder.com/bulkfiles/UNIXInfo/Apache2_Install_Guide.pdf