I can't start wamp server on win7. I'm using vhosts, everything was fine untill I restart wamp server.
httpd-vhost.conf:
<VirtualHost *:80>
ServerAdmin *.*#*.com
DocumentRoot "C:\Users\Rossko\Documents\PHP\wamp\www\***.local"
ServerName ***.local
ErrorLog "C:\Users\Rossko\Documents\PHP\wamp\apache\apache2.4.9\logs\***.local-error.log"
CustomLog "C:\Users\Rossko\Documents\PHP\wamp\apache\apache2.4.9\logs\***.local-access.log" common
in Apache error log is nothing and port 80 is empty. Why is still orange and failed to start? Any idea? I have more virtual hosts in httpd-vhost.conf than projects in www/ folder (not enough time for copy) Is it possible that the error is coused by this?
First, if Apache fails to start, look at the Windows Event Log under
Event Viewer -> Windows Logs -> Application
And then look for Errors report from a Source of Apache
If Apache fails before it can open its error log, errors are written to the Event log.
Second a good way to test your http.conf file and any files that are included within httpd.conf is to do this :-
Launch a command window (Dos Box)
C:
CD \Users\Rossko\Documents\PHP\wamp\apache\apache2.4.9\bin
httpd -t
This should validate the httpd.conf file and all included files, if there are errors they will be reported with a filename and a line number.
Fix the error and then try the httpd -t command again until it responds with an OK message.
If you have defined more Virtual Hosts than you have actually created DocumetRoot folders for, it should just report a cannot find file type message in the Apache error log on startup. It should not actually stop Apache from starting.
Related
ok guys, im stumped. I install centos 7.2 on a vm, installed httpd, enabled it as a service, then started it
then created and edited a config file as follows
<VirtualHost *:80>
ServerAdmin admin#mydomain.com
ServerName www.mydomain.com
ServerAlias mydomain.com
DocumentRoot /var/www/mydomain.com/public_html
#ErrorLog /var/www/mydomain.com/error.log
#CustomLog /var/www/mydomain.com/requests.log combined
</VirtualHost>
So.. When I uncomment the "ErrorLog", which I believe is correct, and there is a file called error.log in directory "/var/www/mydomain.com/"
Httpd.service doesn't want to start, with the error:
(13)Permission denied: AH00091: httpd: could not open error log file /var/www/mydomain.com/error.log.
AH00015: Unable to open logs
I tried doing chown on the error.log file, to apache:apache, and root:root, and the user for the site, but that didn't work.
I also made sure to 755 the directory for www, so the error.log file should be able to be opened by that. Help me out please
Turns out that the error and access logs needed to be placed in /var/log/httpd/ instead of where they were.
All the directories in the path leading up to the error.log must have the executable and readable bit set for the apache user or group, in order for apache to be able to write to the log file.
In order to debug the permissions, you could su to the apache user, and try touching the file:
sudo -u apache touch /var/www/mydomain.com/error.log
I just provisioned an AWS EC2 Linux Server and performed the following tasks.
1) Installed Tomcat.
2) Installed MySQL DB Server.
3) Apache HTTP Server.
4) Started the Apache HTTPD Server.
5) Changed the httpd.conf to have to have
ServerName www.mywebsitename.com:80 --[mywebsitename is placeholder here]
6) etc/hosts file modified to have 127.0.0.1 www.mywebsitename.com
7) "/var/www/html" has already "Hello World" content in index.html file.
8) Other entries in httpd.conf file
DocumentRoot "/var/www/html" &
DirectoryIndex index.html index.html.var
CONCERN:
When I type the IP address from external computer, it should display index.html page as UI. But this is not happening. This is the problem. I tried the same with my website address also. In both the cases(IP and website) it takes lot of time and then displays "This page can’t be displayed" etc.
Please help.
Apologize if I am missing something.
Thanks!
This was taken care. Problem was the port 80 which was not open as part of inbound security rules. As soon as it got opened page got opened.
I have upgraded to Apache 2.2.22 on a Debian 7 VM. I have just installed it using apt-get and not made any config changes except to add my VirtualHost
<VirtualHost *:8001 *:80>
ServerName devintegration.ie
ServerAlias devintegration.ie
DocumentRoot /sites/integration/development/docs
ScriptAlias /console/ /sites/integration/development/console/
ErrorLog /sites/logs/devintegration.ie-error_log
CustomLog /sites/logs/devintegration.ie-access_log common
</VirtualHost>
The behavior I was used to was that any Perl errors or warns appeared in the error log specified in the virtual host. The behavior I'm now getting is that the Perl errors go to the common Apache log in /var/log/apache2 directory and the virtual host log just contains "Premature end of script headers".
I've done some googling on this but most of the results are about mod_perl. I did find this page and the last comment suggests that there was a change to how this works but no information was given as to whether it could be changed. Apache Log Forum "Any information written to stderr by a CGI script will be copied directly to the error log."
Is there a way to configure apache to direct Perl errors and warns to the error log specified in virtual host?
The previous Apache version I was using was 2.2.15.
This is (was?) a longstanding bug in mod_cgid. Its status still is "RESOLVED LATER" which (apparently) means: "stop complaining - we'll do it in a later version, not now". Maybe it has been solved by now (your version, 2.2.22, is 3 years old), but I couldn't find any mention of it.
mod_cgid is the default .cgi handler in the threaded version of Apache. If you switch to mod_cgi, e.g. by using a non-threaded apache (like I do) that should solve your problem.
Though the question asked seems to be very ridiculous but I am practically facing this and left with no option but to ask it.
In httpd.conf file whenever I give port no other than 80 it works fine but if I give port no 80 after some time or may be from beginning it stops working means I am not able to get the desired web page though
when I try netstat -ano it shows that apache server is running on port no 80.
previously IIS7 was working on port no 80.I stoped the process.
Locate your apache config and search for:
Listen 80
change 80 to your desired port
Next you may want to change the vHost setting. Find whereever your vhost settings are located (mostly conf/extra/httpd-vhosts.conf) and locate something like this:
<VirtualHost *:80>
ServerAdmin mail#domain.tld
DocumentRoot "path/to/my/document/root"
ServerName subdomain.domain.tld
ErrorLog "path/to/my/error/log/domain.error.log"
CustomLog "path/to/my/access/log/domain.access.log" common
</VirtualHost>
change the 80 here again to your desired port. Restart your apache.
If youre working on unix:
service apache22 start
service apache22 stop
(commands for apache 2.2)
on windows:
net stop apache2.2
net start apache2.2
(commands for apache 2.2)
Greetings
(make sure your firewall doesnt block your desired port and its not used by another programm. For additional help you should always check your error logs.
So I'm trying to develop a php website locally on my macbook. I'm using apache as my webserver, I have php and mysql installed, and I can use the php index file in my sites folder, but I would like to move all of my development over to a different.
I've been trying to configure apache to run on a different port, so far I've made these changes to my /etc/apache2/extras/httpd-vhost.conf
<VirtualHost *:2727>
ServerAdmin foobar#gmail.com
DocumentRoot "/Users/brianWheeler/Foobar"
ServerName local.foobar.com
</VirtualHost>
And i've edited my /etc/apache2/httpd.conf to say
listen 127.0.0.1:2727 http
I've started apache, but when I go to 127.0.0.1:2727 I get the google chrome page not found type thing.
I've run apachectl -t command to see whats wrong, and I just get this one error
httpd: Could not reliably determine the server's fully qualified domain name, using Foo-Bars-MacBook.local for ServerName
So my questions are, how do I configure the DocumentRoot/index page, and what kind of diagnostics can I run to see why this won't work?
-Brian
httpd: Could not reliably determine the server's fully qualified domain name, using Foo-Bars-MacBook.local for ServerName - this error possibly is not related with your problem.
most of my test server are giving this error but they are running with no problem.
please try to insert the line without ip and http,
listen 2727
edit: can you try following:
NameVirtualHost *:2727
Listen 2727