0

Not sure if it is fit for ServerFault...

We have an e-commerce website, which we are planning to host on AWS. The CMS engine is Drupal7. I have plans to use 2 m4.xlarge (4 vCPU 16GiB) autoscaled across an ELB, hosted in eu-west-1 (Ireland). I am trying to achieve website speed and in process to fine-tune the apache. I have not edited the httpd.conf and it is as it was for httpd2.4. Though I have a Virtual Host.

<VirtualHost *:80>
        ServerName website.com
        ServerAlias www.website.com
        DocumentRoot /var/www/html/website
        DirectoryIndex index.php index.html

        <Directory /var/www/html/website>
                #Options Indexes FollowSymLinks MultiViews
                Options -Indexes
                AllowOverride All
                Order allow,deny
                Allow from all
        </Directory>
</VirtualHost>

<VirtualHost *:443>
        DocumentRoot /var/www/html/website
        DirectoryIndex index.php index.html
        ServerName website.com
        ServerAlias www.website.com
        SSLEngine On
        SSLCertificateFile /etc/ssl/certs/website.crt
        SSLCertificateKeyFile /etc/ssl/certs/website.key
        <Directory /var/www/html/website>
                #Options Indexes FollowSymLinks MultiViews
                Options -Indexes
                AllowOverride All
                Order allow,deny
                Allow from all
                Require all granted
        </Directory>
</VirtualHost>

Can anyone please suggest some mechanisms?

> Current Test Setup:
>     Amazon Linux t2.micro
>     Server version: Apache/2.4.25 (Amazon)
>     PHP 5.6.29 (cli) (built: Jan 18 2017 19:08:44)
>     Database: Amazon RDS MySQL 5.6.27 db.t2.micro (1 vCPU 1 GiB)
>     info.php reflects Server API as Apache 2.0 Handler


    [root@ip-10-1-39-3 kirana11]# httpd -V
    Server version: Apache/2.4.25 (Amazon)
    Server built:   Jan 19 2017 16:55:49
    Server's Module Magic Number: 20120211:67
    Server loaded:  APR 1.5.1, APR-UTIL 1.4.1
    Compiled using: APR 1.5.1, APR-UTIL 1.4.1
    Architecture:   64-bit
    Server MPM:     prefork
      threaded:     no
        forked:     yes (variable process count)
    Server compiled with....
     -D APR_HAS_SENDFILE
     -D APR_HAS_MMAP
     -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
     -D APR_USE_SYSVSEM_SERIALIZE
     -D APR_USE_PTHREAD_SERIALIZE
     -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
     -D APR_HAS_OTHER_CHILD
     -D AP_HAVE_RELIABLE_PIPED_LOGS
     -D DYNAMIC_MODULE_LIMIT=256
     -D HTTPD_ROOT="/etc/httpd"
     -D SUEXEC_BIN="/usr/sbin/suexec"
     -D DEFAULT_PIDLOG="/var/run/httpd/httpd.pid"
     -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
     -D DEFAULT_ERRORLOG="logs/error_log"
     -D AP_TYPES_CONFIG_FILE="conf/mime.types"
     -D SERVER_CONFIG_FILE="conf/httpd.conf"

When I run Google PageSpeed Insight, our scores are not very good Mobile Speed 40/100 Desktop Speed 50/100 How do i optimize this?

PS. I am aware that CDN would increase the scores and taking a more powerful instance+db.instance would also be useful

Amitabh Ghosh
  • 128
  • 1
  • 9
  • You need to look at Drupal optimization, not Apache optimization. Most of the stuff happens in Drupal which affect these things. However, this question is way too broad to suit this site. – Tero Kilkanen Feb 15 '17 at 15:27
  • are you referencing to something like this? https://www.drupal.org/docs/7/managing-site-performance-and-scalability/optimizing-drupal-to-load-faster-server-mysql – Amitabh Ghosh Feb 15 '17 at 17:26
  • Image sizes, caching headers, things like that are key to Google results. It tells you exactly what's wrong. If it says "server is responding too slow" you don't necessarily have to get bigger servers, better caching can be good enough sometimes. – Tim Feb 15 '17 at 18:08

0 Answers0