HHVM, Nginx, WordPress, AWS Ubuntu

Posted: May 20, 2014 in web

HHVM already have Mysqli build in so no need for phpmysql module.

PHP is now HHVM
Apache is now Nginx (you can still use Apache)

Step1. Follow these steps until Laravel. We don’t need it cause we are using WordPress instead.

http://fideloper.com/hhvm-nginx-laravel

I did not create a new config file. I just modify the current default config file. I also just use /var/www/html as my root.

step2. Install MySQL

sudo apt-get install mysql-server

if server is not running.

sudo service mysql restart

Create a wordpress database using mysql console. You can use the root user for now just to test.

> mysql -u root -p
> create datatbase wordpressdb;
> exit

Step3.

modify your nginx config file. (/etc/nginx/sites-available/default

This is to solve:
resource interpreted as stylesheet but transferred with mime type text/html

...
server {
    listen 80 default_server;

    root /www/site.org/public/;
    index index.html index.htm index.php;

    server_name localhost;

    access_log /var/log/nginx/localhost.laravel-access.log;
    error_log  /var/log/nginx/locahost.laravel-error.log error;

    charset utf-8;

location / { 
            root /www/site.org/public/;
            index index.html index.htm index.php;

            if ($request_filename ~* ^.*?/([^/]*?)$)
            {
                set $filename $1; 
            }

            if ($filename ~* ^.*?\.(eot)|(ttf)|(woff)$){
                add_header Access-Control-Allow-Origin *;
            }
    }
....

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s