Varnish and additional ports - apache

How can I add another port to Apache, and keep Varnish listening on port 80 only? The other new port would have a different document root.

Using Apache's sites-available configuration files you can specify what port the configured name should resolve on.

Related

How to Bind apache with two ports?

I am having to servers giving services in two different ports 8080, 2379
how to configure apache to listen to the above ports and forwards the request to available server?
To tell Apache it should listen on specific port(s) add the Listen directive in the configuration (e.g. /etc/httpd/conf/httpd.conf). It can be specified multiple times, as in:
Listen 8080
Listen 2379
Details on this directive can be found here.
This will serve the content from DocumentRoot on these ports. If you want a different configuration on each port, you need to take a look at VirtualHost directive, which essentially allows you to host multiple websites on the same socket (IP/port).

GitLab: How to use ONLY Apache2 and skip nginx?

I am running GitLab on Port 81 today and I need it to run on Port 80 or 443 so that I can access it from office. Problem is that I already host other services using Apache2 on both those ports.
I have tried for hours and hours to do a proxy forward of GitLab from Apache2 host:80/gitlab to host:81 (where nginx is hosting gitlab) without success. I just keep getting problems thanks to the added folder /gitlab in the URL.
So I am in the idea of selfhosting gitlab under my Apache2 server instead. I am thinking of this approach:
Create symlink to webroot of gitlab from /home/www/sites/gitlab
Set up a vhost in Apache on port 81 to point to above symlink.
Enable Apache2 to listen on port 81.
Verify that GitLab functions properly on port 81 using Apache2.
Once confirmed, set up a proxy forward from my Apache2 Port 80 under subdir /gitlab to forward to the new Apache2 Port 81 now hosting GitLab.
What I need to know now is:
Is it possible to completely host gitlab on your own Apache2?
What is necessary to enable in Apache2 virtual host dir? Or other configs? Ruby etc?
Where is the webroot of github index documents etc?
What do you think of permission issues? Will I see any problems?
Thank you all in advance!

define subdomain apache's vhost with lighttpd

Apache is runnig my server with port 80 and lighttpd with 81.
I defined vhost abc.com in apache.
I want to define track.abc.com and all request goes to lighttpd. Is is possible to define track subdomain for abc.com in lighttpd?
It is possible but rather than ports you need to have 2 separate IP addresses if you want to make regular request http://www.domainname.com in your browser. Otherwise you will be forced to call http://www.domainname.com if you intend to use the same IP address for both Apache and Lighttpd server.
You need to declare listening port in both Apache config and Lighttpd otherwise they both would try to bind IP address and port 80 which will result in error and only first server would start up.
I research and answer is Apache's ProxyPass option. First I configured my subdomain on Apache's vhost. and I added my subdomain's chost config file
ProxyPass / http://my_host_name:81/
Now, all my subdomains request goes to lighttp.

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.

Scripts on non-standard ports

How do you install scripts on non-standard ports (ports other than the default 80)
Like how cPanel uses port 2082
Use the Apache Listen or VHost directives to cause Apache to bind to additional ports.