Uninstalling user install of Apache on Mac Mini - apache

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

Related

How to install mod_auth_openidc on RHEL 7

I've been to the Releases site for mod_auth_openidc and brought down the rpm. And attempting to install requires cjose but attempting to find and install that poses a problem as it seems to incorrectly test the version of jansson (e.g., 2.10 is though to be less than 2.3). Most of the documentation I find is years old. Trying to use yum brings in a very outdated version of the mod_auth_openidc (1.8.8) that fails to allow apache httpd to load if you have an OIDCDirectURL coded.
I'm trying to configure Apache HTTPD to call out to an OAUTH2 Server I've created but I can't get the old mod to work and I'd love to know where I can get the piece parts to allow the latest version to install. There are some old downloads on the Releases site if you page back to 2.0 but the libcjose0 is not an rpm.
Do I need to retrieve the dependencies from their github and build them? If someone has done this already and posted the assets I'm happy to retrieve them. I'm surprised RHEL 7 repos don't have the latest (or newer) versions of the mod_auth_openidc.
The version issue reported when trying to install cjose is a red herring. Based on this site I found I needed to install jansson-devel to get past the errant warning about versions.
Going here allowed me to retrieve a fairly recent version of cjose-0.5.1-1.el7.centos.x86_64.rpm which installed without complaints once jansson-devel was installed.
I was then able to install mod_auth_openidc-2.4.9-1.el7.x86_64.rpm from the github repo releases
I am now able to start apache httpd with the OIDCRedirectURI entry in httpd.conf

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

Apache version 2.2 and security vulnerabilities

A penetration test has recently identified that one of our RHEL(6.7) servers running Apache 2.2.15 is vulnerable on a number of points and needs to be updated to the latest version 2.4. I have run yum update and it says that there are no packages marked for update. I understand that I will need to download the updates manually. There are a few questions I have around the requirement to upgrade Apache.
I am up to date on the 2.2 version tree. Does this mean that any security patches made to version 2.4 will be back patched to version 2.2.X as well?
I am running PHP (version 5.3.3) and MySQL (version 5.1.73) - will these be affected by upgrading the Apache version (Google tells me that there is no problem on both fronts - but I thought I'd ask before I started down this route).
If you experts tell me that I have no other choice but to upgrade, then I'm planning on using the instruction set here: https://unix.stackexchange.com/questions/138899/centos-install-using-yum-apache-2-4
Thank you in advance for your advice.
You could download the 2.4 source code from the Apache site and compile it. There's a setting which will configure for RedHat:
--enable-layout=RedHat
This setting will configure the paths for executables, configuration files, libraries etc in one go.
The following should be a reasonable starting point for a configuration line:
sh ./configure --enable-layout=RedHat --enable-mods-shared=all
then perform a make and make install
Do the same with a newer version of PHP (5.3.29 is available in the "old downloads" section, but try a newer version. Check the changes first though) and your problems should be lessened. Finally, MySQL or MariaDB is available for download and compilation too
Obviously, try all of this on a test machine first and back everything up. Your test machine should be as close as possible to your production machine. If you use something like VirtualBox to try it, you can take a snapshot at each point of the process and rollback if something goes wrong

Apache error when installing mod_wsgi on windows: specified module could not be found

I am getting the apache error:
Cannot load C:/ms4w/Apache/modules/mod_wsgi.so into server: The specified module could not be found
I searched on the web already, and found this link and I think I tried most of what is described in here, and my installation is still not working, so I think I need a bit of help.
I run windows XP 32bit pro SP3, freshly installed on a VM
I am running python 2.6 which I downloaded here
I am trying to install mod_wsgi 3.3 for python 2.6, which I downloaded here
Python is installed for all users
I run apache 2.2.22, as part of ms4w package
My file name is correct ( mod_wsgi.so )
My LoadModule entry is: LoadModule wsgi_module modules/mod_wsgi.so
If I comment my LoadModule line apache is running great. Python is working too.
However, I am not sure how to verify that apache's user is able to read the module on windows XP.
I don't know what else to try, thanks in advance to anyone who helps.
hope you might have got your issue resolved. if not there's a very easy tutorial I'd like to suggest, however this is using wampserver.
some points that needs to be considered:
download mod_wsgi version compatible to the wampserver's apache & python version
I've installed the latest wamp with apache 2.4 & python 2.7 32 bit so I got the mod_wsgi from here.
hope it helps.

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