Search code examples
phpnginxwpn-xm

How to host drupal in wpn-xm, nginx


Recently I downloaded the WPN-XM full installer and try to further develop my drupal website, because WPN-Xm performs faster than other development stacks in Microsoft Windows. But in drupal, only homepage is visible, all other pages show 404 error. My site using the clean url feature in drupal. How could I successfully host drupal website with WPN-XM's nginx web server?


Solution

  • Installation Instructions for Drupal 7 with "Clean URLs" and local domain for WPN-XM

    1. https://ftp.drupal.org/files/projects/drupal-7.42.zip
    2. extract into /www folder
      • drupal brings its own folder: drupal-7.42, rename it to drupal7
    3. open in browser: http://localhost/drupal7/install.php
    4. select "standard"
    5. enable PHP Extension "gd"
      • php.ini: extension=php_gd2.dll
    6. create database with Adminer
    7. use the "database", "user" and "pw"
    8. configure site
    9. finally Drupal is installed: http://localhost/drupal7/

    Enable local VHost - http://drupal7.dev/

    1. copy the drupal7.conf from domains-disabled to domains-enabled folder
    2. edit the file and check that you have:
      • root www/drupal7;
      • server_name drupal7.dev;
    3. then add vhost with SCP
      • right-click tray, "ManageHosts"
      • click add enter 127.0.0.1 with drupal7.dev + "ok"
      • click main "ok"
    4. restart nginx
    5. finally, open http://drupal7.dev/

    Enabling Clean URLs

    1. open http://drupal7.dev/
    2. login
    3. To enable clean urls go to "Configuration > Clean-Urls" or directly to
    4. enable checkbox "enable clean urls", then submit
    5. finally, open http://drupal7.dev/admin/content

    In the end you get a vhost drupal7.dev with clean URLs - served from C:\<server>\www\drupal7.