mixture of drupal and non-drupal sites with Perusio config

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
EdPhillis's picture

I have a couple of no drupal sites i need to put on a server containing mostly drupal sites one of which should be served with index.html. If I browse to index.html then the site is fine but I cant get the root url to show index.html.

If I put this as a nested location in drupal.conf then it works but it then breaks all the drupal sites. I can't put it in the site config because it compains of duplicate location directives.

location / {
try_files $uri /index.html;
}

Ive tried a few variations on this but to no avail. According to Perusio's documentation this should be possible and like i say it doesnt have a problem actually serving the html file using the drupal conf files.

Comments

Serving a static HTML site

Garrett Albright's picture

Serving a static HTML site with Perusio's config is pretty easy. I'm doing it at http://2problems.com , which is a static site on the same server as my Drupal-powered personal site. Here's the basic steps:

  1. Copy the example.com.conf file to the sites-enabled directory, rename it, and edit it as normal. (Do not edit drupal.conf or any other configuration file except this one; keep them as they are.)
  2. Change the index index.php line to index index.html
  3. Delete or comment out all of the Drupal-related lines. This includes all lines after ## If you're using a Nginx version greater or equal to 1.1.4 then up to the end of the block that ends with } # HTTP server (that is, include } # HTTP server, but delete/comment out the lines before it).

And viola, a static site with Perusio's config.

Is the same principal also

gapa's picture

Is the same principal also for other non static sites? For example Magento, Wordpress,... I also noticed that Perusio has Piwik config for nginx. Any idea how to combine them?.

br,
gapa

Nginx

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: