Gogs.io running on subdomain with port

383 Views Asked by At

I'm trying to run Gogs.io on an apache webserver along with a standard website, and I'm trying to have Gogs.io used on a subdomain rather than using my standard domain with a port.

Gogs.io runs on port 3000, and I want the url to be

http://gogs.example.net/

Rather than

http://example.net:3000/

Both my public IP with port and example.net:3000 work, but when trying to use gogs.example.net, I always get an AT&T DNS Error Assist page. I'm not sure what I'm doing wrong, as I had it working earlier until I tried to change the name of the subdomain in my apache config, but I changed it back when I started having issues, to no luck.

Here is my Apache config for the page:

<VirtualHost *:80>
   ServerName gogs.example.net
   ProxyPreserveHost On
   ProxyPass / http://example.net:3000/
   ProxyPassReverse / http://example.net:3000/
</VirtualHost> 

This may be impossible, but any help would be greatly appreciated!

1

There are 1 best solutions below

0
On

Fixed the issue by adding an A record to my domain

A Record: git -> 111.222.333.444

As well as modified the VirtualHost settings to include the subdomain in the ProxyPass and ProxyPassReverse

<VirtualHost *:80>
   ServerName gogs.example.net
   ProxyPreserveHost On
   ProxyPass / http://git.example.net:3000/
   ProxyPassReverse / http://git.example.net:3000/
</VirtualHost>