Listing gitea in apache directory index

I have a gitea instance at url.com/gitea with apache proxypass:

ProxyPass /gitea http://localhost:3000
ProxyPassReverse /gitea http://localhost:3000

I would like the /gitea directory to appear at url.com in the apache directory index. How can I do this?

Change

<VirtualHost *:80>
    ServerName url.com
    DocumentRoot "/var/www/url.com"
    ProxyPass /gitea http://localhost:3000
    ProxyPassReverse /gitea http://localhost:3000

    # Other directives here
</VirtualHost>

to

<VirtualHost *:80>
    ServerName git.url.com
    ProxyPass / http://localhost:3000
    ProxyPassReverse / http://localhost:3000

    # Other directives here
</VirtualHost>

Then add the following A RR in your DNS zone as follows:

git.url.com. 14400 in a 1.2.3.4

Where 1.2.3.4 is the IPv4 address of your box where apache is serving your gitea instance.

You’ll need to make adjustments for the hostname in your app.ini file as well so Gitea knows who she is.

Or you could just leave the ServerName as url.com, but anything already there won’t be served, only Gitea will.

I hope that helps :slight_smile:

What I meant was, serve gitea at url. com/gitea, but have the /gitea directory appear in the directory index at url.com.

For example, I have a nextcloud instance at url. com/nextcloud, and a /nextcloud folder appears in the apache index.

You should change app.ini to set ROOT_URL has the /gitea