Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install gogs on Plesk managed VPS #1435

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

Install gogs on Plesk managed VPS #1435

frthjf opened this issue Aug 3, 2015 · 9 comments

Comments

@frthjf
Copy link

@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
Copy link
Member

@unknwon 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
Copy link
Author

@frthjf 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
Copy link
Member

@unknwon 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
Copy link
Author

@frthjf 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
Copy link
Member

@unknwon 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
Copy link
Member

@unknwon 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
Copy link
Author

@frthjf 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
Copy link
Author

@frthjf frthjf commented Aug 4, 2015

Thanks for your support!

@frthjf frthjf closed this Aug 4, 2015
@unknwon
Copy link
Member

@unknwon 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants