How to configure nginx to redirect all requests of subdomain to apache running in same server

My domain is running nginx on port 80. I would like that to access a subdomain (, nginx redirect all requests made ??for that subdomain for Apache running on port 8090.

The application in question I’m trying to use is Gitlab, which is basically a Github / Bitbucket done in open-source Ruby to be installed on your server.

I’m trying to use the Gitlab, packaged by Bitnami, this this link here [1], because it all comes pre-configured, and in theory would not give me a lot of work to set …

My server is running Ubuntu 13.04 with nginx available in the repository.

My nginx configuration at the time this way:

At the moment it’s still not working.

Anyone has a tutorial for beginners on how to perform this configuration.

Sorry I’m English. I’m still learning.


Thanks to everyone.

  • Same question in Portuguese:

Meu domínio esta rodando o nginx na porta 80. Gostaria de que ao acessar um subdominio (, o nginx redirecionasse todas as requisições realizadas para esse subdominio para o Apache rodando na porta 8090.

A aplicação em questão que estou querendo utilizar é o Gitlab, que é basicamente um Github/Bitbucket open-source feito em Ruby, para ser instalado no seu servidor.

Estou tentando utilizar o Gitlab, empacotado pela Bitnami, que esta neste link aqui [1], pois ele já vem todo pré-configurado, e em tese não me daria muito trabalho para configurar…

Meu servidor, esta rodando o Ubuntu 13.04, com nginx disponível no repositório.

Minha configuração do nginx no momento esta assim:

No momento ela ainda não esta funcionando.

Alguem possui um tutorial para novatos, de como realizar essa configuração.

Desculpem-me o ingles. Ainda estou aprendendo.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Do you get any errors? <br> <br>Are apache and nginx listening on ports 80 and 8090? <br> <br><pre>sudo netstat -plutn</pre>