apache xampp gzip - apache

I am trying to get the GZIP module working in XAMPP window vista 64 bit. I have added the .dll file for gzip into the module directory and added in httpconf. Once I add it say it cannot start apache since it cannot find the ApacheGZIP module in the directory that is mentioned in httpconf file...(which I can see exist in the directory)...
One more thing in the modules directory I found that it has the .so files(i thought it was for unix) so i tried adding the .so gzip and added that to httpconf and tried restarting. Again it complained saying it is not a valid window application...
NEED HELP
THnks
Coool

You can try uncommenting the following in /xampp/apache/conf/httpd.conf:
LoadModule deflate_module modules/mod_deflate.so
You should already have mod_deflate.so enabled if you are using XAMPP. XAMPPLite, however, has that disabled.

Related

Apache 2.2/Redhat 2.6 with mod_wsgi

I'm having trouble configuring mod_wsgi with my current set up.
Redhat 2.6.32
Installations setup as non-root user:
Apache 2.2 (attempted to get 2.4, but without access to yum the
dependencies were too much)
Python 3.6
I seem to have successfully installed mod_wsgi into /apache/modules.
Problems:
The apache directory structure is not what most tutorials indicate, its
DocumentRoot is in /apache/htdocs, not /var/www/ or /sites-enabled/ or /sites/available/
I tried putting:LoadModule wsgi_module modules/mod_wsgi.so in httpd.conf but I am returned:
$HOME/apache/modules/mod_wsgi.so into server: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory
Can anyone explain how I can use mod_wsgi with my current setup?
The problem is likely because you self compiled mod_wsgi and the Python installation you used is in a non standard location. In this case you need to se LD_RUN_PATH environment variable when running make for mod_wsgi, with it set to the directory the Python library is in. This way knowledge of where the Python library is is embedded in mod_wsgi. This issue is described in the mod_wsgi documentation:
http://modwsgi.readthedocs.io/en/develop/user-guides/installation-issues.html#unable-to-find-python-shared-library
If you can't rebuild mod_wsgi for some reason, you can also force load the Python shared library into Apache by using:
LoadFile /some/path/lib/libpython3.6m.so.1.0
This should be place just before the LoadModule line for mod_wsgi.
Your libpython3.6m.so.1.0 is not in any of apache's library paths.
You can symlink it to one of the lib directories in apache's library path, or you can add the directory where your libpython3.6m.so.1.0 resides to apache's library path.
Check this question out for help with apache paths: https://serverfault.com/questions/151328/setting-apache2-path-environment-variable

Can not load modules/mod_auth_openidc.so : The specified module could not be found

I want OIDC implementation with my application for SSO integration, and getting an error when trying to execute httpd.exe.
I am using windows server 2008 64 bit.
Apache server 2.4.2 64 bit.
I have downloaded mod_auth_openidc.so for 64 bit downloaded from here -
click here.
I have performed these steps:
Step 1.Downloaded apache 64 bit from here -apache_2.4.2-x64-no-ssl.msi.
Step 2.Downloaded mod_auth_openidc-2.2.0-apache-2.4.x-win64.zip from Git hub - click here
Step 3. Unzipped the file and copied the files to bin and modules location of my apache server respectively.
Step 4. Added the LoadModule auth_openidc_module modules/mod_auth_openidc.so in httpd.conf file present in conf folder in apache.
Step 5. Now when I try to run the apache server(httpd.exe) it gives me an error.
error screenshot here -.
error line from httd.conf file from conf folder -.
Please help!
Thanks in advance.
Please let me know if I can answer your any query.
LoadModule uses a path to load a module, if the path is relative, as in your case, it will be relative to the value in ServerRoot directive.
Since you have manually installed this third party module, you probably should define with full filesystem path to it.
Since you say you copied there already, make sure you are pointing to the correct installation.
It may be a compiler issue; I used binaries from: https://www.apachehaus.com/cgi-bin/download.plx
It may also be due to the version of msvcr120.dll:
mod_auth_openidc library requires msvcr120.dll which is the newer
version of Microsoft VC ++. It looks for this file. We used dependency
walker software to see the tree and what are the required files for
the mod_auth_openidc.iso. It showed missing msvcr120.dll file. We had
to update the current vc++ which added this missing dll in the
windows\System32 folder. and we could restart the server.
See:
https://github.com/pingidentity/mod_auth_openidc/issues/275#issuecomment-305302587

Loading ImageMagick from Apache (XAMPP)

I wrote an image manipulating program with PHP/imagick. The server is installed under XAMPP, which resides in a flash drive.
Now everything works fine except that ImageMagick needs to be installed on every machine I use.
To solve the problem and make it easier, I copied the ImageMagick folder to the flash drive, removed ImageMagick from Windows Environment Variables, and modified Apache config (tried both httpd.conf and extra/httpd-xampp.conf).
httpd.conf
SetEnv MAGICK_HOME "/xmapp/ImageMagick"
extra/httpd-xampp.conf
<IfModule env_module> <----- enabled
SetEnv MIBDIRs "xampp/php/extras/mibs"
SetEnv MAGICK_HOME "/xampp/ImageMagick" <-----
SetEnv MySQL_HOME "/xmapp/mysql/bin"
However, when I started Apache, I got a error message saying "Cannot find CORE_RL_wand_.dll". I'm pretty sure the path is correct and no files are missing. It seems that Apache just can't load ImageMagick.
Here are the versions I'm using:
XAMPP 1.8.2 (Apache 2.4.4 / PHP 5.4.19)
ImageMagick-6.8.7-1-Q16-x86-dll
php_imagick_ts.dll for PHP 5.4 (from Mikko)
Does anyone have any experience with portable ImageMagick/XAMPP?
Is this the correct way to load ImageMagick from Apache?
Try to add to the system path the Imagick's path. Maybe you also have to add as environment variable the MAGICK_HOME. That solved my problem.

Apache could not be started - ServerRoot must be a valid directory and Unable to find the specified module

I'm using xampp portable server and I'm having some trouble with Apache http server, it says "ServerRoot must be a valid directory"
Command line output:
Please close this command only for Shutdown
Apache 2 is starting ...
httpd.exe: Syntax error on line 35 of K:/../../../xampp/apache/conf/httpd.conf: ServerRoot must be a valid directory
Apache could not be started
I checked the line 35 of xampp/apache/conf/httpd.conf and it was:
ServerRoot "/xampp/apache"
Which doesn't exist. My folders are:
K:/../../../xampp/apache/conf <- where the httpd.conf is
K:/../../../xampp/apache/ <- the server root
K:/../../../xampp/apache/modules <- where server modules are
If i change (at line 35) to
ServerRoot ".."
It says:
Please close this command only for Shutdown
Apache 2 is starting ...
httpd.exe: Syntax error on line 65 of K:/../../../xampp/apache/conf/httpd.conf: Cannot load modules/mod_access_compat.so into server: Unable to find the specified module
Apache could not be started
I checked, and modules/mod_access_compat.so exists, so i can't figure out how to fix it.
Any help will be appreciated
Just run setup_xampp.bat from shell (shell from XAMPP control panel)and the paths should be set automatically for the portable version of XAMPP for windows. It has worked for me.
navigate to httpd.conf file in conf direcotry in Apache24 or whatever apache file you have.
Go to ServerRoot= ".." line and change the value to the path where apache is located like "C:\Program Files\Apache24"
If you open an editor and jump to the exact line shown in the error message (within the file httpd.conf), this is what you'd see:
#LoadModule access_compat_module modules/mod_access_compat.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule allowmethods_module modules/mod_allowmethods.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
#LoadModule auth_form_module modules/mod_auth_form.so
The paths to the modules, e.g. modules/mod_actions.so, are all stated relatively, and they are relative to the value set by ServerRoot. ServerRoot is defined at the top of httpd.conf (ctrl-F for ServerRoot ").
ServerRoot is usually set absolutely, which would be K:/../../../xampp/apache/ in your post.
But it can also be set relatively, relative to the working directory (cf.). If the working directory is the Apache bin folder, then use this line in your httpd.conf:
ServerRoot ../
If the working directory is the Apache folder, then this would suffice:
ServerRoot .
If the working directory is the C: folder (one folder above the Apache folder), then use this:
ServerRoot Apache
For apache services, the working directory would be C:\Windows\System32, so use this:
ServerRoot ../../Apache
Change below path in httpd.conf file to your setup. This will fix the issue.
Define SRVROOT "C:\Apache24"
ServerRoot "${SRVROOT}"
Make sure your ServerRoot in httpd.conf points correctly to the Apache path. Otherwise you will see this message for every further module.
Examples:
/etc/apache2/apache2 for Linux
"C:\Program Files\Apache24" for Windows
I would think that ServerRoot needs to be absolute. Use something like "/apache/docroot"
If you use an actuall version there is a "setup_xampp.bat/.sh" script in the root directory.
The path has to be absolute but the script changes all needed paths to your current location.
Use the drive letter with forward slashes to get started (c:/apache/...).
Navigate to your XAMPP directory, you will find a folder called apache, open it, then copy its path, my path is "D:\Hacking Tools 2\Programs\XAMPP V2\apache"
Open up apache\conf\httpd.conf with any text editor
Scroll down until line 30-40
You will find a code like this: ServerRoot "xampp\apache"
Now, change it to be the apache directory, as I said in Step #1, my path is "D:\Hacking Tools 2\Programs\XAMPP V2\apache", so, my code will be ServerRoot "D:\Hacking Tools 2\Programs\XAMPP V2\apache"
It should look somehow like this: ServerRoot "D:\XAMPP\apache"
Now go back to the XAMPP main directory and run xampp_start.exe
It worked for me, if it doesn't work for you, just comment with the error value after opening the xampp_start.exe
Run "setup_xampp.bat/.sh" and then
Delete "\" at the end, so your ServerRoot should be like
"C:.....\apache" NO
"C:.....\apache\"
Below solved. I have wrongly given the bin /directory/, so faced the issue:
if you installed apache at C:/httpd-2.4.41-o102s-x64-vc14-r2/Apache24
then the modules are at.. C:/httpd-2.4.41-o102s-x64-vc14-r2/Apache24/modules
So, the file C:/httpd-2.4.41-o102s-x64-vc14-r2/Apache24/conf/httpd.conf
should have
Define SRVROOT "C:/httpd-2.4.41-o102s-x64-vc14-r2/Apache24/"
Hope that helps
That for changing directory of the XAMPP.
So you have to change the Directory as well as
ServerRoot "E:/xampp/apache"
DocumentRoot "E:/xampp/htdocs"
<Directory "E:/xampp/htdocs">
ScriptAlias /cgi-bin/ "E:/xampp/cgi-bin/"
<Directory "E:/xampp/cgi-bin">
AllowOverride All
Options None
Require all granted
</Directory>
I also facing same problem for changing My laptop.
thanks
I checked the line 35 of xampp/apache/conf/httpd.conf and it was:
ServerRoot "/xampp/apache"
Which doesn't exist. ...
Create the directory, or change the path to the directory that contains your hypertext documents.
I had this exact same problem with Xampp portable on Windows 10 Home. I went through all the suggestions and none worked. I did get it working with Windows Firewall Settings and an error on my part.
My pen drive was labelled Drive E on my laptop and Drive F on my Desktop. Once I corrected that using disk partition and changed the drive letter to E for my desktop to windows asked for access for the firewall and everything clicked.
The steps to correct the drive letter were:
1. Hit the windows key and type Partition, "create and format harddisks partitions" should be at the top, hit enter
2. Find the drive you are looking for at the top panel and click on it.
3. Right click on it and select change drive letter and path, click okay
4. Now try to start xampp control panel and start Apache and Mysql
5. if you get the windows firewall click allow.
I can't say this will work but it did for me and is what I added to this discussion. I also think it might have been just the firewall did not allow the oither drive letter.

installing additional apache modules

I need to enable additional modules for apache eg, mod_proxy, mod_proxy-html, and mod_proxy_balancer.
Is there a way for me to do that without recompiling the whole apache?
Thanks
You can list the compiled in modules by executing:
$ apache2 -l
Note: this is NOT /etc/init.d/apache2. If the module you need is not already compiled in, you will need to include it inside the configuration file.
See here for a Debian/Ubuntu description.
You need just to copy those modules to some directory on Your system/server,
then add a command for appache in configure file.
ex:
LoadModule mod_proxy modules/mod_proxy.so / linux
LoadModule mod_proxy modules/mod_proxy.dll / windows
http://httpd.apache.org/docs/2.0/mod/mod_so.html#loadmodule
If your apache is built with shared library support, then you could copy these modules from another machine(same OS, same/lower version and preferably same compiler) and place it in modules folder. Then use LoadModule directive to dynamically load it.
If you dont have the modules, you can download the source and build/install apache in a different directory (using --prefix) with option --enable-mods-shared=most. Copy the required modules to the original apache modules folder, and use LoadModule to load it.