Make WAMP being accessible through localhost instead of localhost:8080 (or specific port) - apache

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

Related

Apache localhost already used?! Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName"

I have a problem, I had apache Solr installed and it uses localhost for access on webserver...
now I have installed Apache and startet httpd.exe and I get the warning / error:
Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName"
when I stop solr, I can start and use localhost for apache httpd...
but I want to have the possibility to use both webservices, how can I configure Apache to do that? and get access to service not with localhost, but with another domain name or some configuration in httpd.conf
I tried to change the line "ServerName www.example.com:80" in httpd.conf file but no effect,
sorry but I'm pretty new to webservers and Apache, how should I configure that?
You have several things mixed here:
Installing Solr should in no way be related to other questions, unless it is configured to run on port 80. If that is the case, you simply can not run two services on the same port so you have to pick, or just move Solr to 8080 or whatever.
Could not reliably determine... is just a friendly warning and will not prevent any functionality, and it should disappear when you add ServerName www.example.com:80 in httpd.conf
With default settings, Apache will respond to any http request that comes to port 80, so you don't have to configure anything there (and if you want to modify that, use VirtualHost). You can achieve reaching your webserver by other hostnames by editing hosts file on your machine. If you want others to be able to do that, you have to configure DNS (which is separate issue)

Apache named virtual host not working after changing port

I have a jboss server and an apache web server on the same machine. Jboss has to stay listening on port 80, so I had to switch which port apache listened on. Before, when it was listening on port 80, everything worked fine. I set up a virtual host for a website I'm working on, and I was able to use the URL for that site as a I defined it in the virtual host file and my hosts file (I'm using Windows). After I changed the port it listened on, I get the following error:
Problem loading page: Unable to connect
I've restarted the server, restarted my machine, changed the port to several different numbers that weren't being used for anything else, and I even tried changing the localhost IP address from 127.0.0.1 to 127.0.0.2 to see if that would help, but none of this has worked. I changed the port in both httpd.conf and httpd-vhosts.conf, but nothing has really worked. I checked the IP address for the site with ping, and it showed that I'm using the right one. I would really appreciate some help because nothing is working.
Likely a local firewall issue. You should only need to change Listen, ServerName and <virtualhost>. You can use lsof or netstat to confirm the listening port.

Apache Server - Change port from 8080 to 80

I have recently bought Amazon EC2 server.
Instead of installing it trough command line, I downloaded the latest zip file and deployed my application in WebApps folder.
The problem is tomcat is listening all the requests on port 8080 instead of 80.
I have tried changing the server.xml file in conf folder but no help!!
It is still listening to port 8080.
How do I make it listen to port 80
Oddly enough, Tomcat has its own documentation about doing this:
http://wiki.apache.org/tomcat/HowTo#How_to_run_Tomcat_without_root_privileges.3F
Probably the most straightforward way on *NIX is to use jsvc which is a small utility that works by binding to a port, dropping privileges, and then launching Tomcat, which can then use lower-numbered ports.
There are a bunch of other ways, but jsvc is the easiest and offers some other benefits as well. Discovering those benefits is left as an exercise for the reader.
The following would apply toward various systems, while the second link would related toward windows based systems.
First link :http://www.klawitter.de/tomcat80.html
Second link:
http://javarevisited.blogspot.com/2011/12/how-to-change-tomcat-default-port-8080.html?m=1
Ok. So finally I figured out way to solve this problem.
First of all i was doing it wrong way. One should not open port 80 for tomcat7. Tomcat7 should always run port 8080 or anything which is greater than 1024.
So to make your web site work without port. Follow below steps.
Install Apache2. (By default it runs on port 80).
Go to localhost and make sure apache2 is installed properly.
Then you will have to redirect all the requests which are going on port to redirect to port 8080.
To do that follow below link. (this is important step)
https://www.digitalocean.com/community/tutorials/how-to-use-apache-http-server-as-reverse-proxy-using-mod_proxy-extension
Hope this answer helps!!!
Thanks
Fahad Mullaji
I wouldn't recommend doing that, for what it is worth...
That could work in theory, but you are literally using httpd as a proxy to forward every request. There isn't much of a reason, IMHO, to choose this over simply changing the port to 80 in the Tomcat configuration and ditching httpd. You can use port 80 for Tomcat but historically, in production environments, httpd is generally used to serve static assets and such and dynamic content would be served by Tomcat. Generally one would install mod_jk and use the jkMount directive to connect Tomcat to httpd via AJP, which is a lot faster being a binary protocol than using HTTP.
There used to be a much bigger difference in terms of performance, here.
Tomcat is able to serve static resources via its DefaultServlet pretty well these days.
For AJP setup, see the documentation here:
https://tomcat.apache.org/tomcat-4.0-doc/config/ajp.html

Forward Apache Server to Proxmox Web Gui

So, I'm pretty new to apache and I'm having some issues finding a solution to my answer.
I have a domain name abcdefg.com (for example) and I have a public facing Fedora apache webserver on my home network at 192.168.10.10. I then have another machine that is a proxmox VE server at 192.168.10.20.
I know I can forward ports and just type [https://abcdefg.com:8006] to get to my proxmox server, but I want to be able to go to abcdefg.com/proxmox and it then somehow make a call to [https://192.168.10.20:8006] internally (https is required).
Can anyone point me in the right direction? I don't need to be spoonfed, I'm just not sure where to start looking. I've already figured out how to use the "Location" tags but its not working for this, seems to be a bit more involved.
--Cheers
You need to run a reverse proxy server, which Apache can do with a few extra mods. This will listen on a specific port (Let's say port 444 in your case) and send requests to whatever IP and port you specify behind the scenes.
See the following link for how to reverse proxy a site: Simple Apache reverse proxy example
Simply change the mywebsite.jamescoyle.net references to point to your internal proxmox box on port 8006 - eg.
ProxyPass https://192.168.10.20:8006/
ProxyPassReverse https://192.168.10.20:8006/

I want apache give no response

I am running apache2.2 on my WinXP PC.
I want no body but a specified IP access the site.
I already use httpd.conf to deny other request.
But that's not enough, I now want to set apache to send no response, not 403.
To be simple, I want to hide my server, I don't want others know I am running a webserver.
You could bind the Apache server to localhost only. I've not tested it, but in ports.conf, you could change:
Listen 80
to
Listen 127.0.0.1:80
That would make apache bind to the IP address 127.0.0.1, which is only available from the machine itself.
This is clearly something very easy to do with a firewall, so you should try to install and configure a firewall.
On the apache side the only thing you could try is using mod_security with the "drop" action. Check this servfault answer for example. But if the connection is closed by apache an attacker could still see the connection was first accepted, so your web server is not really hidden.