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
ServerRoot. The ServerRoot directive specifies the top-level directory containing website content. By default, ServerRoot is set to "/etc/httpd" for both secure and non-secure servers.
Step by step Apache install on Windows Download the installation media in the form of a ZIP file. Extract the contents of the Apache Web Server 2.4 zip to the file system. Locate the extracted Apache24 folder and copy this folder to the root of C:\ Open the C:\Apache24\bin folder and run the httpd.exe command.
If you installed httpd from source, the default location of the configuration files is /usr/local/apache2/conf . The default configuration file is usually called httpd. conf .
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 love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With