Install gogs on Plesk managed VPS #1435

Closed
frthjf opened this Issue Aug 3, 2015 · 9 comments

Comments

2 participants
@frthjf

frthjf commented Aug 3, 2015

I'm trying to setup gogs on a virtual server which is managed by Plesk. I created a subdomain git.domain.de and database cogs using Plesk and configured gogs like this:

ROOT_URL https://git.domain.de
HTTP_ADDR https://git.domain.de

When I navigate to the subdomain nothing happens. How can I use the apache2 subdomain configured in Plesk as cogs entry point?

@Unknwon

This comment has been minimized.

Show comment
Hide comment
@Unknwon

Unknwon Aug 4, 2015

Member

Hi there,

First you need to make sure Gogs is actually running.

And then check your Apache2 config make sure request has been correctly redirected(I don't know Apache2 so can't tell more).

Member

Unknwon commented Aug 4, 2015

Hi there,

First you need to make sure Gogs is actually running.

And then check your Apache2 config make sure request has been correctly redirected(I don't know Apache2 so can't tell more).

@frthjf

This comment has been minimized.

Show comment
Hide comment
@frthjf

frthjf Aug 4, 2015

$ service gogs status
gogs start/running

But I don't know where Apache should redirect to? So where is the webpage frontend of gogs located? I guess I have to config something like ServerRoot /path/to/webpage/gogs/

frthjf commented Aug 4, 2015

$ service gogs status
gogs start/running

But I don't know where Apache should redirect to? So where is the webpage frontend of gogs located? I guess I have to config something like ServerRoot /path/to/webpage/gogs/

@Unknwon

This comment has been minimized.

Show comment
Hide comment
@Unknwon

Unknwon Aug 4, 2015

Member

But I don't know where Apache should redirect to

Redirect to whatever value you set Gogs listen on localhost.

Member

Unknwon commented Aug 4, 2015

But I don't know where Apache should redirect to

Redirect to whatever value you set Gogs listen on localhost.

@frthjf

This comment has been minimized.

Show comment
Hide comment
@frthjf

frthjf Aug 4, 2015

How do I instruct gogs to listen to the subdomain? I configured /opt/gogs/custom/conf/app.ini setting both ROOT_URL and HTTP_ADDR to https://git.domain.de. Is there another option I missed or something I have to do after changing the config?

frthjf commented Aug 4, 2015

How do I instruct gogs to listen to the subdomain? I configured /opt/gogs/custom/conf/app.ini setting both ROOT_URL and HTTP_ADDR to https://git.domain.de. Is there another option I missed or something I have to do after changing the config?

@Unknwon

This comment has been minimized.

Show comment
Hide comment
@Unknwon

Unknwon Aug 4, 2015

Member

How do I instruct gogs to listen to the subdomain?

Gogs has nothing to with subdomain, it's about your Apache/nginx config redirection.

Gogs only listens on a port on localhost.

Member

Unknwon commented Aug 4, 2015

How do I instruct gogs to listen to the subdomain?

Gogs has nothing to with subdomain, it's about your Apache/nginx config redirection.

Gogs only listens on a port on localhost.

@Unknwon

This comment has been minimized.

Show comment
Hide comment
@Unknwon

Unknwon Aug 4, 2015

Member

Redirect whatever your domain is in apache/nginx and redirect to this localhost:port, for example in Nginx, redirect try.gogs.io to http://localhost:3000

Member

Unknwon commented Aug 4, 2015

Redirect whatever your domain is in apache/nginx and redirect to this localhost:port, for example in Nginx, redirect try.gogs.io to http://localhost:3000

@frthjf

This comment has been minimized.

Show comment
Hide comment
@frthjf

frthjf Aug 4, 2015

Ah, now I get it. So what you have to do in Plesk environment, navigate to your subdomain server settings and add the following additional directives for HTTP and HTTPS:

RewriteEngine On
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/

frthjf commented Aug 4, 2015

Ah, now I get it. So what you have to do in Plesk environment, navigate to your subdomain server settings and add the following additional directives for HTTP and HTTPS:

RewriteEngine On
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
@frthjf

This comment has been minimized.

Show comment
Hide comment
@frthjf

frthjf Aug 4, 2015

Thanks for your support!

frthjf commented Aug 4, 2015

Thanks for your support!

@frthjf frthjf closed this Aug 4, 2015

@Unknwon

This comment has been minimized.

Show comment
Hide comment
@Unknwon

Unknwon Aug 4, 2015

Member

No problem! Glad to hear it. 🍺

Member

Unknwon commented Aug 4, 2015

No problem! Glad to hear it. 🍺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment