After installing mu LAMP stack. I have port 80 running by default athttp://127.0.1.1/

Now I want to add new ports, eg 8000, 8888.

How can I add them in my /etc/apache2/apache2.conf in my Ubuntu 17.04?

This is how I do it in Arch Linux:

2.2 In /etc/httpd/conf/httpd.conf, uncomment the following two lines for Proxy:

LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so 

2.3 Don't forget to add Port 443 to your listen ports in /etc/httpd/conf/httpd.conf:

Listen 443 Listen 8888 

2.3 Add these blocks:

<VirtualHost *:8888> ProxyPreserveHost On ProxyRequests Off ServerName ServerAlias xxxx.co.uk ProxyPass / ProxyPassReverse / SSLEngine on SSLCertificateFile "/etc/letsencrypt/live/" SSLCertificateKeyFile "/etc/letsencrypt/live/" </VirtualHost> 

What about the Apache in Ubuntu?

I don't even see:

LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so 

in apache2.conf in my Ubuntu 17.04.

1 Answer

In Ubuntu Xenial:

  1. Add additional ports in the /etc/apache2/ports.conf like so:

    Listen 80 Listen 8888 
  2. Now in your VirtualHost file add that port like so:

    <VirtualHost *:80 *:8888> .... </VirtualHost> 
  3. Restart apache2:

    sudo apache2ctl restart 

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy