How to change apache default port 80

  1. Last updated
  2. Save as PDF
  • Product: Aleph
  • Product Version: 20, 21, 22, 23


How to set up port 80 for Apache server in Aleph?


  1. Shutdown the WWW server with util W
  2. Stop Apache
    server (as UNIX user aleph)

apachectl stop

  1. Change file $httpd_root/conf/httpd.conf from

ServerName <server-name>:8991
Listen 8991


ServerName <server-name>:80
Listen 80

  1. Change file $httpd_root/htdocs/.index.html from

var loc = "http://<server-name>:8991/F?RN="+session;
var loc = "http://<server-name>:80/F?RN="+session;

  1. Change occurrences of 8991 in $httpd_root/htdocs/main.html to 80. (Note: these lines in main.html are no longer used in normal circumstances, but, for consistency, we suggest changing them.)
  2. Change
    file $alephe_root/aleph_start from

setenv HTTPD_PORT 8991
setenv PDS_PORT 8991

setenv HTTPD_PORT 80
setenv PDS_PORT 80

  1. Activate settings in $alephe_root/aleph_start: source $alephe_root/aleph_start
  2. Start Apache server (as UNIX user root)

# $httpd_root/bin/apachectl_auto

  1. Start WWW server (as UNIX user aleph)
  2. Test access to OPAC

Additional Information

  • To see the current Apache
    port use


  • For automatic startup change



Note:  the “a20_1” will need to be changed for your particular version/instance, such as:  a23_1 .

  • Article last edited: 24-Jun-2014

To answer the original question:

To change the XAMPP Apache server port here the procedure :

1. Choose a free port number

The default port used by Apache is 80.

Take a look to all your used ports with Netstat (integrated to
XAMPP Control Panel).

Then you can see all used ports and here we see that the 80port is already used by System.

Choose a free port number (8012, for this exemple).

2. Edit the file

This file should be found in C:xamppapacheconf on Windows or in bin/apache for Linux.:

Listen 80
ServerName localhost:80

Replace them by:

Listen 8012
ServerName localhost:8012

Save the file.

Access to : for check if it’s work.

If not, you must to edit the http-ssl.conf file as explain in step 3 below. ↓

3. Edit the file “http-ssl.conf”

This file should be found in
C:xamppapacheconfextra on Windows or see this link for Linux.

Locate the following lines:

Listen 443
<VirtualHost _default_:443>
ServerName localhost:443

Replace them by with a other port number (8013 for this example) :

Listen 8013
<VirtualHost _default_:8013>
ServerName localhost:8013

Save the file.

Restart the Apache Server.

Access to : for check if
it’s work.

4. Configure XAMPP Apache server settings

If your want to access localhost without specify the port number in the URL
instead of .

  • Open Xampp Control Panel
  • Go to ConfigService and Port SettingsApache
  • Replace the Main Port and SSL Port values ​​with those chosen (e.g. 8012 and 8013).
  • Save Service settings
  • Save Configuration of Control Panel
  • Restart the Apache Server

    It should work now.

4.1. Web browser configuration

If this configuration isn’t hiding port number in URL it’s because your web
browser is not configured for. See : Tools ► Options ► General ► Connection Settings… will allow you to choose different ports or change proxy settings.

4.2. For the rare cases of ultimate bad luck

If step 4 and Web browser configuration are not working for you the only way to do this is to change back to 80, or to install a listener on port 80 (like a proxy) that redirects all your traffic to port 8012.

To answer your problem :

If you still have
this message in Control Panel Console :

Apache Started [Port 80]

  • Find location of xampp-control.exe file (probably in C:xampp)
  • Create a file XAMPP.INI in that directory (so XAMPP.ini and xampp-control.exe are in the same directory)

Put following lines in the XAMPP.INI file:

apache = 8012

Now , you will always get:

Apache started [Port 8012]

Please note that, this is for display purpose only. It has no
relation with your httpd.conf.

How do I change my default Port 80?


Open the file: [app-path]

Enable port 80 (and 443) by changing the appropriate settings from N to a Y . … .

Change the server port in all providers installed on your network. … .

Change the server port in the User Client config file: … .

Restart the Application Server..

How do I change my default Port for Apache?

To change the port number, follow the steps below:.

Edit the /opt/bitnami/apache2/conf/bitnami/bitnami.conf file and modify the value specified in the Port directive. For example: Listen 8443 <VirtualHost _default_:8443>.

Restart the Apache server for changes to take effect. sudo /opt/bitnami/ restart apache..

How to change Port 80 in Linux?

How To Change the Default HTTP Port (80) For ClusterControl.

Redhat/Centos. Edit the /etc/httpd/conf/httpd.conf file and change Listen 80. … .

Ubuntu/Debian. Edit the /etc/apache2/ports.conf file and change Listen 80. … .

Redhat/Centos. Edit the /etc/httpd/conf.d/s9s.conf file and change <VirtualHost *:80> … .


How do I stop Apache from running on Port 80?


Log in to the appliance with the root account via SSH or console connection..

Stop the Apache service with the following command: service apache2-lmi stop..

Edit the /etc/apache2/ file..

Start the Apache service with the following command:.

Selengkapnya Disini

Leave a Reply

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *