How can I make apache use port 3000 instead of 80 to run my ruby on rails application on an external server?
Edit your httpd.conf Find the line that says Listen 80 and change the 80 to whatever port you want to use.
Don't forget to restart apache.
In
Server version: Apache/2.2.22 (Debian)
Server built: Feb 1 2014 21:26:04
There is file named ports.conf in /etc/apache2 dir and you can change listening ports from there.
On Ubuntu, it's /etc/apache2/ports.conf.
Related
I have XAMPP installed on my machine. Additionally, I have also installed apache2 as a stand-alone web server. How do I run both on the server independently?
You just have to make sure they listen to different ports.
XAMPP:
Listen 80
APACHE2:
Listen 90
I have apache 2.2 http server installed on windows 7. Port 80 is already being used and I am attempting to bind apache to an alternative free port. I have amended the C:\Apache\ApacheHTTPserver\Apache24\conf\httpd.txt file to change the value of Listen 80 to Listen 88 or Listen 7777 (I have checked the ports 88 and 7777 are free) and also changed ServerName localhost:80 to ServerName localhost:88 or ServerName localhost:7777 respectively. But when I attempt to start the Apache service I am given an error and it states this in the logs;
The Apache service named reported the following error:
OS 10013)An attempt was made to access a socket in a way forbidden by its access permissions. : make_sock: could not bind to address 0.0.0.0:80
Why will this not change the Apache port number?
I have discovered what I was doing wrong. I was editing the httpd.conf file by locating it in Windows Explorer and opening in notepad and saving. But when I opened the httpd.conf file using Start >> Apache HTTP Server 2.2 >> Configure Apache Server and amend the port to 88 the service starts okay
Just installed WAMP on a Windows 7 machine.
When I go to localhost / from the localhost, everything works. But when I try to go to the machine from another computer on the local network, I get the following error message:
Forbidden
You don't have permission to access / on this server.
Apache/2.4.9 (Win64) PHP/5.5.12 Server at 192.168.1.13 Port 80
How do I solve this?
See the below question. You have to allow access through port 80 to your Apache server in httpd.conf by making sure you have Listen *:80
How to access site running apache server over lan without internet connection
An additional resource with items to do when you install a fresh copy of WAMP
http://forum.wampserver.com/read.php?2,119754,119754
Click on wamp icon > Apache > Apache modules > rewrite module(enable this module)
I installed Varnish Cache my CentOS server.I try the do configuration correctly but as I read many document say to me change apache port Listen 80 to Listen 8080. But I couldn't find any Listen 80 line on my server /etc/httpd/conf/httpd.conf but i found 0.0.0.0:80 line. Is it same thing ? If those are same thinhgs, when i change my sites not working.
I know that I make huge logical mistake but i can't understand.
Thanks
In this file /etc/httpd/conf/httpd.conf there should be a line: ServerRoot "/etc/httpd"
Below this line there is Listen 80 Change this to Listen 8080 and restart apache
Restarting with command: /etc/init.d/httpd restart
I also found this:-> http://updatedlinux.wordpress.com/2011/04/29/how-to-change-the-default-port-number-for-apache-http-server/
Possible that this will help!
To me it looks like SELinux is standing in the way and is prohibiting the use of your custom port.
So the solution should be one of these:
a) disable SELinux (if your scenario allows it and you don't need it)
b) set SELinux permissive
c) configure SELinux to allow your custom port for the httpd service
see /etc/sysconfig/selinux for a) and b)
use semanage for c)
HTH
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>