# Magento installed in a subdirectory

**URL:** <https://www.ruby-forum.com/t/magento-installed-in-a-subdirectory/219958>\
**Category:** NGINX\
**Created:** [May 23, 2012, 5:04am UTC](https://www.ruby-forum.com/t/magento-installed-in-a-subdirectory/219958 "2012-05-23T05:04:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [May 23, 2012, 5:04am UTC](https://www.ruby-forum.com/t/magento-installed-in-a-subdirectory/219958/1 "2012-05-23T05:04:17Z")

</div>

I followed the instructions on the wiki article (link 1) for configuring  
nginx and magento, which works great… if magento is installed in the  
document root folder. I have magento installed in a subfolder, e.g.  
/store/. I found an example (link 2) that works; however, it is not as  
complete as the first example. I was able to mix the two through trial  
and error and get a partially working store. As far as I can tell, I  
should modify the try\_files (line 15), @handler (line 39), the js  
rewrite (lines 42-44), and the catch 404s (line 47). How should I change  
them? If anyone has a complete .conf, I would very much appreciate a  
copy. Thanks

1. 

[http://www.magentocommerce.com/wiki/1\_-\_installation\_and\_configuration/configuring\_nginx\_for\_magento](http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/configuring_nginx_for_magento)  
2) [php - Magento on Nginx - Configuration - Stack Overflow](http://stackoverflow.com/a/7658103)

Cross-post (only because I can’t delete it)  
[http://www.magentocommerce.com/boards/viewthread/281319/#](http://www.magentocommerce.com/boards/viewthread/281319/#)

Posted at Nginx Forum:

> **[Magento installed in a subdirectory](https://forum.nginx.org/read.php?2,226741,226741#msg-226741)**
>
> I followed the instructions on the wiki article (link 1) for configuring nginx and magento, which works great... if magento is installed in the document root folder. I have magento installed in a subfolder, e.g. /store/. I found an example (link 2)...
