On this post I'll show you how to run Drupal 8 or any PHP application using Apache HTTP Server with mod_event enabled and PHP 7-FPM
First we need to get the required PHP and Apache packages from the Ubuntu repository:
$sudo apt-get install php7.0-fpm apache2 libapache2-mod-fastcgi
then we need to disable the worker that's enabled by default and switch to mpm_event:
$sudo a2dismod mpm_worker $sudo a2enmod mpm_event
Now that we have enabled the event module, let's activate some required extra apache modules needed to run our apps like Drupal:
$sudo a2enmod alias rewrite fastcgi expires headers remoteip ssl actions
We need to create a config file for PHP-FPM so apache is aware of how to treat it:
$sudo nano /etc/apache2/conf-available/php-fpm.conf…
You might have crossed through this error a lot when developing web apps sharing multiple domain names for the same app and it usually triggers when app with domain name A tries to grab images/fonts/audio and somo other files from the same app with domain name B. Cross-Origin Request defines a way for browsers to share content in a secure way preventing your site of Cross Site Scripting attacks. But sometimes you do have apps that require multiple domain names and the resources must be shared between these in the same network so you know that content sharing is secure.
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://mysite.com/sites/all/themes/mysite/js/slick/slick/fonts/slick.woff. This can be fixed by moving the resource to the same domain or enabling CORS.…
Sometimes you may find the need to shutdown a site for any reason an a specific server, basically the server that is listening to the web, so of course you will always want to keep that site(s) up and running while you perform whatever is needed on it, let's call it, 'external server', on a different environment, 'internal server'.
To do so you need to use an apache module called mod_proxy which enables a web server act as a router of traffic to another server, a tunnel.
- Enable mod_proxy and mod_proxy_http mod_proxy_html on external server
- create a virtual host on internal server pointing to internal server, ex:
Allow from all
ProxyPass / http://proxy.…Read more...