# Can't create repo when using reverse proxy with nginx

**URL:** <https://forum.gitea.com/t/cant-create-repo-when-using-reverse-proxy-with-nginx/110>\
**Category:** Install/Maintain/Configure\
**Created:** [October 28, 2017, 7:42pm UTC](https://forum.gitea.com/t/cant-create-repo-when-using-reverse-proxy-with-nginx/110 "2017-10-28T19:42:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phoenix616](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/phoenix616/32/80_2.png) [@Phoenix616](https://forum.gitea.com/u/Phoenix616)\
**Post date:** [October 28, 2017, 7:42pm UTC](https://forum.gitea.com/t/cant-create-repo-when-using-reverse-proxy-with-nginx/110/1 "2017-10-28T19:42:20Z")

</div>

I am trying to setup Gitea (1.2.2. also tested with a build compiled from source, 1.1.0+674-g5866eb2) behind an nginx (1.12.1) reverse proxy to enable ssl. (via proxy\_pass) Everything seems to work fine besides the fact that the repository creationpage (under /repo/create) does not load most of the times (it randomly works) and eventually times out. (according to the nginx log)

I already tried setting proxy\_connect\_timeout, proxy\_send\_timeout, proxy\_read\_timeout and send\_timeout to higher values (150, 600, 60000) but none of them do the trick. The page works without issues when directly connecting to the port and the gitea log/console looks the same as it does when using the port:

```
[Macaron] 2017-10-28 21:18:00: Started GET /repo/create for x.x.x.x
2017/10/28 21:18:00 [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `description`, `num_teams`, `num_members`, `diff_view_style` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{4}
2017/10/28 21:18:00 [I] [SQL] SELECT count(*) FROM `notification` WHERE user_id = ? AND status = ? []interface {}{4, 0x1}
2017/10/28 21:18:00 [I] [SQL] SELECT * FROM `user` INNER JOIN `org_user` ON `org_user`.org_id=`user`.id WHERE `org_user`.uid=? AND `org_user`.is_owner=? ORDER BY `updated_unix` DESC, `user`.`name` ASC []interface {}{4, true}
[Macaron] 2017-10-28 21:18:00: Completed /repo/create 200 OK in 37.782009ms

```

I’m a bit out of ideas on what to try next, maybe someone else had a similar problem before?

---

<div class="post-metadata">

**Author:** ![andreynering](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/andreynering/32/41_2.png) [@andreynering](https://forum.gitea.com/u/andreynering)\
**Post date:** [November 12, 2017, 7:16pm UTC](https://forum.gitea.com/t/cant-create-repo-when-using-reverse-proxy-with-nginx/110/2 "2017-11-12T19:16:31Z")

</div>

Sorry for the late reply. You should create a bug report on the issues: [https://github.com/go-gitea/gitea/issues](https://github.com/go-gitea/gitea/issues)

---

<div class="post-metadata">

**Author:** ![Phoenix616](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/phoenix616/32/80_2.png) [@Phoenix616](https://forum.gitea.com/u/Phoenix616)\
**Post date:** [November 12, 2017, 7:45pm UTC](https://forum.gitea.com/t/cant-create-repo-when-using-reverse-proxy-with-nginx/110/3 "2017-11-12T19:45:00Z")

</div>

I didn’t really want to open an issue as long as I couldn’t confirm that it is an issue with gitea itself as I suspect that the error is somewhere in my setup.
