Im trying to run XAMPP on the same machine as IIS but I cant make apache work. I changed the ports to 8080 and 4333 but I still cant run it. If I stop IIS service, apache starts normally. Is there any way to make it work here?
thanks.
These should work together as long as not colliding on ports, I currently run both at same time myself, and have run into same pain you have. XAMPP Apache doesn't say which port, it just don't start.
I commented out all "443 Listen" & "NameVirtualHost *:443" entries - (with #) , and changed xampp sites to a non iis port (my case 86) in apache\conf\httpd.conf, but also be sure you check the config(s) in E:\xampp\apache\conf\extra. xampp has "extra" configs there.
Be sure to check that D:\xampp\apache\conf\extra\httpd-vhosts.conf is not set to use\listen on 443.
updating answer here a bit...
Actually you may just need to comment the Listen 443 line, (change to #Listen 443, or change to 4333 or what ever) in D:\xampp\apache\conf\extra\httpd-ssl.conf at about line 36 or so. The section in that file with ..
<VirtualHost default:443>
defined can just sit there unused if you dont need it then, so no need to comment that section out for now.
Sorry, that was actually my issue - I did this so long ago I forgot. Apache files are not set up the same way.
...
Basically there is a port conflict you need to clear up. also be sure you dont leave "copied" or "backed" up conf files with the .conf extension in the conf folders - sometimes those get grabbed and used. Good luck on your dup port Hunt.
... putting my comments here because they may be getting buried...
ok, just try commenting out any listen settings other than the one you need (8081) in the config files instead (httpd.conf, extra/httpd-ssl.conf & extra/httpd-vhosts.conf). You may be bumping into your own listen settings elsewhere in your conf files. one time i mistakenly set 443 in main httpd.conf and in ssl.conf. besides you might not need 443 at all anyway. the answer is in your conf files somewhere. perhaps a file contents search for "listen" in the /conf/ folder might help.
also you may want to check out the "netstat" button from xampp panel - it should tell you a bit more about what is using what ports, that sometimes gives good clues
And if you did not know or are new to xampp/apache VERY IMPORTANT
REMEMBER TO RESTART APACHE AFTER ANY CONF CHANGE !
Related
I upgraded our web server from Ubuntu 12.04 to 14.04, which also upgraded Apache from 2.2 to 2.4.
The upgrade was successful and all existing virtualhosts are running great.
I created a new site yesterday and noticed that it was loading the default host instead of the one it should. I checked the .conf file in /etc/apache2/sites-enabled and it does look a little different than the other ones.
I understand that Apache 2.4 has some changes like "Require all granted" which shows in the new .conf file alongside the previous "allow from all". I tried commenting it out but that didn't do anything.
I guess I could try backing up this file and copying over an existing working .conf file and just modify the paths to see if that works - but having to do this for every new site I add in the future is not a solution.
Does anyone experience this during their upgrade process?
--- UPDATE ---
I looked again at the conf file and I noticed that all my other working conf files have 2 distinct differences:
They list the IP next to the port < VirtualHost 1.2.3.4:80 >, the broken one just had an asterisk *
They duplicate the < VirtualHost >, one for port 80, another for port 443
So I added the IP in the broken file in the <VirtualHost...> and duplicated the settings for port 443, restarted apache, and the site worked.
So now it comes down to where in the Virtualmin/Webmin settings would I make adjustments to fix this?
While creating, first option is which IP you want to bind you domain to. That is very IP you have defined against your domain DNS.
But that is only needed if you have bounded IP with port in your conf file.
By default its *:80. So no need to bind.
enter image description here
This is the problem that I currently have. I tried some options like running it as administrator, changing the port on http.conf & httpd-ssl.conf but it doesn't work. I hope you can help...
check if your apache is not already running,
run apachectl configtest (or change apachectl to your apache runtime),
check if default config is working,
check if config with modified dirs is working,
check your apache server logs (Im sure you'll find clue in there)
btw. from the error message it looks like something (tomcat server) is already running on 8080 port so you'll either need to change port of tomcat or change the port on which apache is trying to start (/etc/httpd/httpd.conf + virtuals dir or /etc/apache2/*.conf) - it looks like it wants to start on 8080 which is quite default port for web server (apart of 80 which is added by default so when you're writing something.com your browser is really going to something.com:80 - just you dont see it)
I am trying to set up Apache http 2.2, with mod_jk module.
The intention is to set up a load balancer right on my PC, for test purposes.
So I made some changes to httpd.conf to set some parameters, then I run it and I get the popup:
"Windows couldn't start Apache 2.2 on local PC. For more information check system events log. If it's not a windows service contact service provider and reference the code:1"
I check on the log and I get:
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.0.35 for ServerName
So I uncomment on httpd.conf line: ServerName myPcName:80 and run it again.
I get the same popup, but this time I don't get anything on the events log.
Any idea on how to let it work?
(Nothing is bound on 80 port.)
Thank you
Please check if port 80 is being used by other application or not. Most of the time in my case "Skype" was using port 80. So I had to stop it and then I used to start Apache service.
To troubleshoot further what you can do is, goto apache's bin directory and run httpd.exe -t option. This will show you exactly what is causing problem.
The configuration file in the apache /conf folder, has a piece of code that starts from C:. It is copyrighted and therefore you cannot change the code.
All you have to do is make a second copy of the whole apache folder and put it directly in your C: directory. Your apache file is in System 32 causing you to use cprompt right. Having 2 identical apache folders one in C: and one in System 32 bypasses the problem.
Apache shutdown unexpectedly. This may be due to a blocked port,
missing dependencies, improper privileges, a crash, or a shutdown by
another method. Press the Logs button to view error logs and check the
Windows Event Viewer for more clues If you need more help, copy and
post this entire log window on the forums
I found that there was nothing in the logs, and the advice to go to the xampp root with a cmd and run apache_start.bat actually got the error (a missing path in the .conf file) which didn't show up any other way.
All working now.
If this is a fresh install, rather than using the control panel to start Apache, you may want to go to XAMPP's root directory and call apache-start.
In my case, apache was failing to start due to a configuration error
httpd.exe: Syntax error on line 37 of C:/..../xampp/apache/conf/httpd.conf:
ServerRoot must be a valid directory
If that's the case, make sure that you run setup_xampp (Thanks to https://stackoverflow.com/a/17978400/239408 !)
Most likely you have blocked port 80. The most common problem is skype, change skype settings to use a different port, and restart.
Then run apache.
IF you encounter this kind of error in XAMPP
"This may be due to a blocked port, missing dependencies,
improper privileges, a crash, or a shutdown by another method.
Press the Logs button to view error logs and check
the Windows Event Viewer for more clues
If you need more help, copy and post this
entire log window on the forums"
1) First thing you do is click the Netstat on the Xampp (it will give you the list of names, ports, address and PID)
2) Find the Port 80 and Check the Name who uses the port. for Example [httpd.exe]
3) Then go to the window task manager and click the processes
4) Find the Name of the application who uses the port. click the name and click end process
5) then back to the Xampp and click Start
Right click on Xampp Control Panel, and click on 'Run as Administrator'
That solved my problem.
I previously installed my XAMMP on one of my usb keys. Windows exchanged inadvertently their drive letters, making all my paths wrong in my XAMMP setup files. I changed back manually the drive letter of one key (before replugging the other one into my pc) so everything is ok again.
Hope this was helpfull.
JoVD.
As I am working in a corporate environment where developers faces firewall issues, none of the other answers resolved my issue.
As the port is not used by Skype, but by some other internal applications, I followed the below steps to resolve the issue:
Step 1 - From the XAMPP Control Panel, under Apache, click the Config button, and select the Apache (httpd.conf).
Inside the httpd.conf file, somehow I found a line that says:
Listen 80
And change the 80 into any number / port you want. In my scenario I’m using port 8080.
Listen 8080/1
Still from the httpd.conf file, I found another line that says:
ServerName localhost:80
And change 80 to 8080/1.
ServerName localhost:8080
Step 2 - From the XAMPP Control Panel, under Apache, click the Config button again, but this time select the Apache (httpd-ssl.conf). Inside the httpd-ssl.conf file, find line that says
Listen 443
And change the 443 into any number / port you want. I’ll using 4433 as the new port number.
Listen 4433
Still from the httpd-ssl.conf file, find another line that says
ServerName localhost:443
And change 443 to 4433.
ServerName localhost:4433
Remember to save the httpd.conf and httpd-ssl.conf files after performing some changes. Then restart the Apache service.
I've installeed wamp and it runs fine, all except if I want to access it I have to type in localhost:8080 (the 8080 is the port it listens to).
Can I make it so that it just works with localhost without requiring the port number to be entered and if so how?
Something else has already grabbed port 80, that is why it wont work.
Run
wampmanager->Apache->Service->Test port 80
This will launch a command window and tell you what is using port 80.
Whatever it is will need to be re-configured to use another port or for example if its IIS and you dont use IIS it should be un-installed.
Check this site for a bit more information: http://forum.wampserver.com/read.php?2,13744.
You're going to want to edit your http.conf file, searching for 8080, and replacing it with 80, where applicable. I know that is generic, but that is the best I can do without actually seeing your http.conf file.
You need to change the port Apache is listenning to.
Access apache/conf/httpd.conf under your WAMP directory.
In this file, there will be a "Listen 8080", change it to whatever port you want to.
You must restart Apache after this. It can be achieved using Services in Windows.
If the service does not restart (and you havent messed up your config file), it is because the port you chose is already in use and you wont be able to use it.
If you want to use multiple ports for each project, consider reading about Apache Virtual Hosting.
Hope I helped