Apache port changed but still have to http://localhost:81/dashboard/ - apache

I changed Apache port from 80 to 81 because 80 is used by skype.
(I did this
Locate the following lines :
#Listen 12.34.56.78:80
Listen 80
ServerName localhost:80
Replace them by :
#Listen 12.34.56.78:81
Listen 81
ServerName localhost:81)
Long story short, if I do http://localhost:81/dashboard/ it works but I want to only use http://localhost/dashboard/.
I did Xampp -> Config -> Service and Port Settings -> Main port changed from 80 to 81 and SSL port still 443
I'd like to know where's the mistake and how can I repair it.

If you want to open http://localhost/dashboard/ your apache should work on port 80, this is default http port.
So you have to open skype and go to Tools->Options->Advanced->Connection and uncheck "Use port 80 and 443 for additional incoming connections"

The HTTP protocol is set to port 80 by the IANA standards. If you want to use connect to an HTTP server on another port, you must add the port to the URI, as in http://localhost:81/
Now, you can edit /etc/services on a linux box and change 'http' to 81, but this is not recommended, as any other HTTP connections from that host to all servers will all try to connect to port 81, which will break all HTTP clients. (Seriously, this will probably break all kinds of things you don't expect. Just use the port in the URI.)

You can change skype's default port as follow...
Go to Tools -> Options -> Advanced -> Connection and uncheck the box "use port 80 and 443 as alternatives for incoming connections"
Anyway your apache must work on port 80 in order to access http://localhost/dashboard without mentioning a port.

Related

Stopping https port on wsubdomain

I would like to set a server on port 443 to handle safari web notifications. So I would like to disable port 443 from Apache for that subdomain. I tried doing it by removing the web domain from ssl.conf or setting SSLEngine off after putting the domain on port 80, but in all cases when I execute nmap on the domain port 443 always pops up, and when I execute the other service on port 443 I get an error.
How do I manage it?

Set virtual host for redirect to multiple web server (apache)

Don't know what the perfect title for this, but here it is.
I'm running a server with Windows Server 2008 R2.
On this server I have three webapps and it already run well
App1 using Apache2 on port 80
App2 using IIS on port 81
App3 using Xampp Apache on port 83
I already have a domain for each port
1. domain1.com for port 80
2. domain2.com for port 81
3. domain3.com for port 83
all domain has been pointing to server, and it is work fine when I use (:port) behind the domain, eg. domain1:83 is already open Xampp Apache on port 83.
however, what I need is when I type domain1.com it should open port 80, domain2.com it should open port 81, and domain3.com should open port 83.
Simple say, I don't need to add :81 or :83 if I want to open those sites.
Main apache server used are Apache2, and I need configuration to automatically when I type domain2.com it goes to port 81 (localhost:81), and so if I type domain3.com it goes to port 83 (localhost:83)
Meaning is, that Apache2 only handle App1 on port 80, when I want to access App2 using domain2.com then it refer to localhost:81 then the process will be handled by IIS, and so for App3 using domain3.com it refer to localhost:83 then Xampp will handle the process.
Every Apps has different config so I cannot put it to single port 80 then difference it by DocumentRoot since other Apps are not processed by Apache2.
Regards,
Set up a name-based virtual host support on Apache. It is handling port 80, so it will handle all requests to port 80, no matter what port number is used.
You then have two options.
Redirect
Proxy
You can redirect the traffic to the other port (which will show the port number in the address bar of the browser, and cause search engines to index URLs with that port number in them)
Redirect / http://domain2.com:81/
Or you can proxy the traffic through Apache (which will relay everything through Apache, which could have performance implications):
ProxyPass "/" "http://domain2.com:81/"

How to open a new port in apache

I want to open a new port in apache so that i can accept http requests on the port with http://ip:port
Check Binding to Addresses and Ports:
For example, to make the server accept connections on both port 80 and
port 8000, on all interfaces, use:
Listen 80
Listen 8000
To make the server accept connections on port 80 for one interface,
and port 8000 on another, use
Listen 192.0.2.1:80
Listen 192.0.2.5:8000
IPv6 addresses must be enclosed in square brackets, as in the
following example:
Listen [2001:db8::a00:20ff:fea7:ccea]:80

xampp blocking remote external connections

I have read several questions here and still nothing is working.
I am trying to access my test site from a remote computer (either network or wan but i need wan eventually)
I just re-downloaded the newest XAMPP for windows 10.
I can go to localhost (also the other 3 names I setup in the host file to redirect to localhost) and of course 127.0.0.1 (localhost).
If I try and use my ip address of the computer or someone else trys my ip address on their computer, we get page cant be found (from chrome)
If I check apache access logs I see nothing about an access attempt.
Netstat -a shows these two records
TCP 0.0.0.0:80
TCP 0.0.0.0:443
TCP [::]:80
TCP [::]:443
I have gone to Windows Firewall -> Advanced Settings -> Inbound rule. Here it shows that appache has 2 rules, one for UDP and one for TCP allowing all ports.
I have gone to my rounter and port forwarded 80 & 443 (which is what xampp is running on) and still nothing
I even have put my computer in a DMZ. I also turned off the windows firewall. (all back on after testing of course this is dangerous).
Xampp has no locationmatch in xampp-http.conf like other questions.
My vhost file has the directory setup like this:
<Directory "C:/Users/username/Desktop/git repos/stats-website">
AllowOverride All
Order Allow,Deny
Allow from all
Require all granted
</Directory>
This is my testing rig and I am now testing an API that is being accessed externally before I send it to the production server. I have been at this for 2 days and out of all possibilities
UPDATE
I have solved the issue somewhat. I can now get to it from everything except localhost or 127.0.0.1
In httpd.conf I changed it from just Listen 80 to Listen pcipaddress:80. I thought listen 80 defaulted to binding on more than just localhost
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
Listen 192.168.1.241:80
#Listen 80
How do I do it so it works both localhost and also remote connections?

WAMP apache httpd.config and hosts - how to alias localhost to port 8080?

Ok so I configured my apache installation on Windows 7 such that it listens on port 8080 by changing the respective entry in httpd.config.
I was too stupid to realize that now I have to access localhost with :8080 at the end.
Question: is there a way to have my box automagically resolve localhost to 127.0.0.1:8080 ? I don't like haviog to type :8080, and NO I CANNOT change the port to 80, I need that one for firewall.
Thanks
no. hostnames have nothing to do with ports. You'll have to specify the port yourself, or set up a proxy on the usual port 80 that will do the 8080 requests on your behalf. ... or bite the bullet and use port 80 directly and move your firewall elsewhere.