How to route external domain to router website hosted in local virtualbox web server (Windows as host OS and CentOS 7 as guest OS)

There are test scenarios that requires a development site hosted in local web server accessible via live external domain. In this article, will show how to make a development site hosted in local virtualbox web server (Windows as host OS and CentOS 7 as guest OS). Note: make sure you have full administrator access to your router and the router's WAN IP is a public IP address.

Steps:

  1. Open and configure your Vagrantfile. Add the following lines:

Solution to so many redirects error executing independent PHP script in a Drupal 8 site running under nginx

The issue is when executing a standalone PHP script in a Drupal 8 site running under nginx gets "The page isn't redirecting properly" error in Firefox and getting this error in Chrome: "This page isn't working [domain] redirected you too many times." but the PHP scripts that executes under Drupal 8 bootstrap don't get this issue. The bug must be on nginx webserver configuration. Investigating the nginx configuration file php_pass.conf that handles my Drupal 8 site PHP scripts:

Logout in Linux shell command prompt without leaving your commands history

When we logout in Linux shell command prompt, we leave all the commands we have executed in Bash history file. For some reason you don't want your activity to be traced, the following is a command that will prevent your history of commands to be saved:

  
kill -9 $$
  

Just in case this command is hard to remember, it is useful to make this command available for easy access by using up/down arrow keys . Edit your Bash history file:

  
vi ~/.bash_history
  

… and enter:

Tags

Drush can't connect to MySQL server on localhost using WinNMP on Windows

First time I setup and test Drush on my local machine using WinNMP on Windows executing a cache clear on a local Drupal site under Git BASH or cygwin:

  
drush @webfoobar cache-rebuild
  

... I get this error:

  
No Drupal site found, only 'drush' cache was cleared
  

I excuted the following drush command to investigate the cause of the error:

  
drush @webfoobar -d st
  

... got the following output message: