Xamp Apache not starting - apache

To start off, I know there's similar threads regarding this. I followed them but can not get it to work which is why I'm opening another one.
When I'm trying to start Apache using Xamp control panel it gets stuck on "Attempting to start Apache service..". I have set the main port to 8080, SSL port to 8081. In the http.conf file I set Listen 8080 and ServerName localhost:8080.
What else is there to be done?

Related

having error while starting apache server in xampp

I am having an error while starting apache serve in xampp
here is the screenshot of the error
I tried uninstalling it and again installed it but it not working.
I've changes port in httpd.conf file 8080 in place of 80.
I've changes port in httpd-ssl.conf file 443 in place of 4433
please give me some solution to this problem

Can EasyPHP Devserver Appache Listen to Multiple Ports?

Installed EasyPHP Devserver on Windows 7.
EasyPHP Devserver Version 17.0 (pretty the latest)
EasyPHP Devserver Apache Version 2.4.25
You may skip direct to my conclusion below.
Here is my process of trials.
In the httpd.conf file, I added the second Listen port
Listen 127.0.0.1:80
Listen 127.0.0.1:8080
Then at the EasyPHP Devserver website console (http://127.0.0.1:1111) I restart the Apache. the httpd.conf file will be rewritten to the following, and Apache cannot start. (Where can I see the error log? Nothing written into EasyPHP Devserver\eds-binaries\httpserver\apache...\logs)
Listen 127.0.0.1:80
Listen 127.0.0.1:80
If I leave the httpd.conf file with only one Listen port
Listen 127.0.0.1:8080
Apache starts successful, but httpd.conf is also rewritten back to
Listen 127.0.0.1:80
And in the EasyPHP Devserver website console (http://127.0.0.1:1111) > Http Server Settings (the gear icon) > there is a drop down menu for us to select the Port: 80.
There are a few options, 80 8080, 8000, 8888, 8008. If I change here, and restart the Apache. the httpd.conf is updated according to this setting.
Conclusion
My conclusion is, no matter what I set in the httpd.conf file, the Listen 127.0.0.1:80 will be rewritten by the setting in the EasyPHP Devserver website console > Http Server Settings > Port. The real setting is controlled by the EasyPHP Devserver website console. The httpd.conf file Listen directive is not functionable.
Question
Here comes the question. In fact I only wish to configure Apache Listens to multiple port, 80 for production and 8080 for development. How can I do it?
Nice. I find out a Brute-Force solution.
In EasyPHP-Devserver-17\eds-binaries\httpserver\apache...\eds-app-actions.php line 97, it is replacing the website console settings to the Apache httpd.conf. I just commented // file_put_contents (__DIR__ . '\conf\httpd.conf', $serverconffile); and Apache httpd.conf will not be overwritten anymore. Nice.
See? The is one of the best parts of open-source. We can always Brute-Force it.
you have to comment line 66,67:
//$replacement = '${1}' . $server_port;
//$serverconffile = preg_replace('/^([\s|\t]*Listen.*\:[\s|\t]*)(.*)$/m', $replacement, $serverconffile);
the line update port number

Apache server in port number 80

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.

Problems with Apache Tomcat and Wamp

this is probably a noob problem but I can't get this to work. The Apache on wamp is currently on Listen 8080 because the regular localhost wouldn't work. However when I turn on Tomcat it is also on 8080 which is conflicting with wamp. I am connecting to Tomcat via Eclipse plugin. With Tomcat on I can't get into phpmyadmin on wamp.
Apache's httpd.conf in wamp is set to:
Listen 8080
ServerName localhost:80
Only with this setting I can get wamp to work.
localhost:8080 will work and 127.0.0.1:8080 works as well. Turning on Tomcat will automatically override wamp's settings. How can I get wamp to just be a regular localhost address and not have it take an 8080 port where Tomcat is sitting on?
try to change the port tomcat is using.
Go to conf folder in tomcat installation directory
e.g. C:\Tomcat 6.0\conf\
Edit following tag in server.xml file
Change the port=8080 value to port=80
Save file.
or another solution is , you can change your wamp port from 8080 to any other one...

How do I configure apache2 to a port other than port 80?

I have installed apache2 on ubunto and have messed around with the text on the localhost page. Now I'm being asked to show it running on a port other than port 80. How do I do that?
You should change the line Listen x in your httpd.conf where x is the port number. You'll need to restart your apache server after that.
In the file: /etc/apache2/httpd.conf
change the following line:
Listen 80
to:
Listen <NEWPORT>
After that you need to restart the apache server:
sudo service apache2 start
UPDATE: Looks like with Ubuntu, the default /etc/apache2/httpd.conf is empty and the recommended approach is to create a new .conf file under /etc/apache2/conf.d so that even with software updates, the user changes are persistent.
So just create a new file say /etc/apache2/conf.d/mycustomizations.conf
Listen <NEWPORT>