Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Change default website on port 80

Lion Server comes with a default website on port 80.

The port field is greyed out and I would like to change it to 8080


I have created a second website entry and. This I would like to be on the 80 port.

Thus having the default http protocol poiting to my own site and 8080 to the Lion built in site.


Q: how to do this.


:-( was able to do this in 10.6 :-(


Regards

Coen

Posted on Aug 10, 2011 12:14 PM

Reply
11 replies

Aug 19, 2011 3:31 PM in response to Coen Jeukens

The only way to do this is in the conf file.

You'll have to find the entry there. Keep in mind however that if you need support from Apple on this point, they'll tell you that you've broken the system and need to re-install. They will not help you change the conf file back. So make sure that you back up the original file BEFORE you change anything there.


The file is:

/etc/apache2/sites/0000_any_80_.conf.default


On line 4 (on mine) it reads:

<VirtualHost *:80 >


Change to:

<VirtualHost *.8080 >


There's a space between the 8080 and the >

You'll want to copy and paste the change I think. This solution will only work on the one site. If you have more than one site served from the apache server, then you need to change it system wide.

For instance... on port 8080, you'd have to change the /etc/apache2/httpd.conf file like so:

pico /etc/apache2/httpd.conf

Find the string of text: "Listen 80"

Change it to "Listen 8080"


Note that all the sites on your apache server will listen on that port.

Changing the first file will only change the one site.

Aug 26, 2011 3:24 PM in response to mike.habermeier

You can change the site that comes up on port 80. You're off to a good start by creating a new site at port 8080.


1. Check /etc/apache2/sites/virtual_host_global.conf to make sure that your server is listening on port 8080:


Listen *:80

Listen *:443

Listen *:8080


The "8080" line should have been added when you used Server.App to add a new site at port 8080.


2. Edit /etc/apache2/sites/0000_any_80_.conf and change the VirtualHost entry from "*:80" to "*:8080". Save.


3. In the same folder, edit the .conf file for your newly-created site (the one at port 8080). Change its VirtualHost entry from "*:8080" to "*:80". Save.


4. In Terminal, type the command


sudo apachectl restart


5. Now if you browse to http://localhost, you should see your new site. If you go to http://localhost:8080, you'll get Lion's collaboration portal, the old default.


Exit and reopen Server.App. You should now see port 8080 (grayed out) shown next to the default Web site.


This isn't perfect. On my machine, this maneuver causes the default collaboration site (now localhost:8080) to lose track of its landing page icons, and I expect its confusion runs deeper than that. I don't use those services, so I haven't tried to fix it.


Best of luck, Mike.

Change default website on port 80

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.