WAMP Server 3.0.0 cannot open apache conf file - apache

I've re-installed WAMP in order to put it into a different directory. This was mainly so everything is automatically backed up.
Mysql starts ok, but apache fails with the following message from the event viewer:
The Apache service named reported the following error:
httpd.exe: Could not open configuration file bin/conf/httpd.conf: The system cannot find the path specified. .
This file is in the correct place (C:\googledrive\wamp64\bin\apache\apache2.4.17\conf) and there isn't any other stray httpd.conf files that it might be picking up on the path or anywhere.
Any ideas?

This turned out to be a permissions problem. It seems that the system account didn't have access to the directory containing the config file, but I guess must have had enough access to start up Apache and give that helpful (not) message!

Related

Where can I find httpd.conf file for Apache on my windows?

I am trying to fix one venerability on my production web server(Apache), Venerability is "The HTTP headers sent by the remote web server disclose information that can aid an attacker, such as the server version and technologies used by the web server"
For this I have gone for some solutions , some where I found that to solve the above Venerability we need to edit the httpd.conf file on server but I did not find httpd.conf file in my entire system (using windows 10 os) can any one please let me know hot find that file or how to resolve that Venerability on production ?
You can find httpd.conf in
installed folder ex Apache24
Apache24/conf/httpd.conf
On Windows, I have seen people run Apache from all kinds of weird and wonderful places.
You need to track down where your Apache instance is running from, normally its running as a service on windows. If you open the properties on the service and look at the Path to executable, it should be something similar to the below.
"C:\Program Files\Apache24\bin\httpd.exe" -k runservice
Or it could be
"D:\Some Application\Version\WEB\tool\SOFTS\HTTPD\bin\httpd.exe" -k runservice
Unless there is an -f flag, setting the location of the conf. There will be a "conf" folder at the same level as the "bin" folder regardless of the path. This location is set at compile time so unless you have bespoke version off Apache this should be the location.
If you are struggling to find the service or a launcher that is running Apache. You can use WMI with a WQL query to look for processes which are called httpd.exe and get its executable path.
wmic process WHERE name="httpd.exe" GET ExecutablePath
In Xampp Control panel, in apache row, click on "config" button and then you see the term Apache(httpd.conf).

How can I run an index.html file on my localhost server?

I purchased a fancy little "visual menu maker" over at envato (Code Canyon) from here: https://codecanyon.net/item/z-menu-maker-drop-down-and-mega-menu/9240528
I was using their sample app where you can test out the tool and I was able to create a nice little menu for my site. But you have to purchase a license to export the code.
I purchased the license and the first "Getting Started" requirement is to "Start your Web Server and open the index.html file. This is where I'm lost. BTW... for reference, you can scroll to the bottom of that documentation page to see all the files that were included in the download.
When I try to open that "index.html" file in my browser, it doesn't load.
I followed some instructions to get my native Mac Apache server running, and everything seems to be working, with my localhost, but I don't know how to open this file through my Apache Web Server.
Any help would be so appreciated!!
I am assuming you have your Apache installed on your Mac under /etc/apache2 folder
If you want to serve your html files and related components, you need to tell apache from where to find your files
So , you need to configure apache so that it can server your files.
first you need to open an terminal from lunch menu then go to the apache2 installation directory
cd /etc/apache2
Then you need to open httpd.conf file and make necessary changes,
sudo nano /etc/apache2/httpd.conf
You will see "DocumentRoot" line/. Change it with your directory where you put your files.
Change also Directory path with yours. (It should be in same config file such as
with
<Document "some_path">
Then you should restart apache server with command
sudo apachectl restart
Now you can try to access your file . you can also check http://localhost to validate
You need to put the files somewhere within the DocumentRoot of your Apache web server, and then you should be able to visit them with http://localhost/ (assuming the index.html file is in the root of the DocumentRoot).
I'm not familiar with the default setting of DocumentRoot on the Mac port of Apache, but you should be able to find that quite easily in the configuration. On Linux that would commonly be found somewhere under /etc/apache2 or /etc/httpd.
There may be further configuration needed if the files expect some sort of server-side module to be activated (e.g. PHP), but it sounds like they are just plain HTML.
Some good answers were given but I think this particular app needed a few extra steps in order to work properly.
The developer got back to me and told me I'd need to install a MAMP solution in order to run the app.
So I installed that and then took the unzipped folder and all its contents in this folder /MAMP/htdocs/
Then when I visit http://localhost:8888/ZMenuMaker/ the app runs without a hitch!

Configure Apache on Windows 7

I want to test some code on localhost before uploading to a live site. So I decided to install Apache. I'm running 64bit windows 7 enterprise edition. I downloaded httpd-2.0.64-win32-x86-no_ssl.msi. I installed it under C:\Program Files (x86)\Apache Group\Apache2
I have set domain name and server name to localhost in my installation, and used default value for all other steps. In my configuration file httpd.conf, I have ServerName localhost:80.
I followed everything I can find on online apache installation tutorials. But when I typed in localhost in my browser, I got a 404 error :(
I know it's very hard to diagnose this way, but I just wonder if someone can spot an important step I'm missing.
I'm feeling it could be something to do with my 64bit machine, and the long folder name Program Files (x86). But I have tried to install on C:\Apache directly and failed too (even got an error during installation). Can someone help?
Finally figured it out. Apache service didn't start because another system process was listening to port 80. Refer to these two posts for solutions:
http://forums.zpanelcp.com/archive/index.php/t-5265.html
http://www.softaculous.com/board/index.php?tid=1575&title=Apache_won%27t_start
Good luck to all!
Did you start the service?
Also, you should install XAMPP or WAMPP, which offers Apache, PHP and MySQL support without all the configuration hassle.
If you got a 404 error then either the webserver is running or you failed to start it and have something very wrong with the existing network config on your machine.
The latter is a lot more likely - and you can check this by looking at the logs which it has generated - there should be entries in both the access and error log.
If the problem is the spaces in the path (you'll see an error relating to the documentroot from the entries added to the error_log at startup) then (IIRC) you can either enclose the path in double quotes or use a path for the document root which doesn't have spaces - the content doesn't have to site below the directory you installed Apache into - indeed it's arguable that using a different path is good practice. Note that several versions of mod_fcgid don't like paths with spaces even if you quote them.

Zend server CE - Will not load .php file rather downloads it

I installed Zend Server CE on Windows 8. When I try to load a .php file in my browser it does not load but downloads the php file instead.
My root for the server is C:\Program Files (x86)\Zend\Apache2\htdocs\
I looked everywhere on the web but there is no documentation.
I would recommend against having your document root in program files because of all the security. Reinstall it outside of program files and it might/will probably work.
How do you invoke the file? You cannot use the full windows path there ie: c:\Zend\apache2\etc.. But probably localhost/yourfile.php or 127.0.0.1/yourfile.php. Can you open zend's interface at localhost:100081?
If you get a internal server error well then it serves php files. Now enable errors in php.ini and find out what is wrong probably some path. You are getting a php error and they are set to not display so you get the server error. That does mean php files are parsed by apache and not downloaded. This question here on so has pretty much what you need to configure.
Just remembered you had the zend-framework tag so you could check in application.ini for error handling settings.

Why won't my local Apache open html pages?

so, I'm running Apache on my laptop.
If I go to "localhost", I get the page that says,
If you can see this, it means that the installation of the Apache web server software on this system was successful. You may now add content to this directory and replace this page.
except, I can't add content and replace that page.
I can click on its links, and that works fine.
First of all, there's not even an "index.html" document in that directory. If I try to directly access one that I created with localhost/index.html, I get "the request URL was not found on the server." So, I'm not even sure where that page is coming from. I've searched for words in that page under the apache directory, and nothing turns up. It seems to redirect somewhere.
Just as a test, I KNOW that it loads localhost/manual/index.html (doesn't matter what that is) so I tried to replace that with something I've written, and I received the message
The server encountered an internal error or misconfiguration and was unable to complete your request.
The error log says,
[Fri Sep 12 20:27:54 2008] [error] [client 127.0.0.1] Syntax error in type map, no ':' in C:/Program Files/Apache Group/Apache2/manual/index.html for header \r\n
But, that page works fine if I open directly with a browser.
so, basically, I don't know what I don't know here. I'm not sure what apache is looking for. I'm not sure if the error is in my config file, my html page, or what.
Oh, and the reason I want to open this using apache is (mainly) because I'm trying to test some php, so I'm trying to get apache to run locally.
Thanks.
"By default, your pages should be placed in the "C:\Program Files\Apache Group\Apache2\htdocs" folder for Apache 2.0 and the "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs" folder for Apache 2.2. When your site is ready, simply delete the existing files in the folder and replace them with those you want to test."
From here.
OK,
To answer my own. . .I found that the "Listen" directive in the configuration file had been set to "Listen 80" instead of "Listen localhost: 80".
Also, localhost/htdocs/index.html doesn't work, but localhost/index.html does.
Hopefully this can help someone in the future.
Thanks, Schroeder.
If you have Skype it also uses the same ports(80, 443) as Xampp does. So start Xampp first and then Skype.
[source: http://starikovs.com/2011/02/23/apache-doesnt-start-in-xampp/]