Drupal Talk
Drupal Blogs, Pictures, and more on WordPress: Run Drupal 7 in Nginx
After so many days we have talked about setting up Nginx, PHP-FPM, MariaDB and some PHP caching. We can now try to run a Drupal instance on them. Before we starts, let me listed out all the previous posts.
- Nginx – Installation on Ubuntu Precise
- Nginx + PHP-FPM on Ubuntu Precise
- Nginx – Enable Microcaching
- MariaDB – Installation on Ubuntu Precise
- Run phpMyAdmin on Nginx in Ubuntu Precise
- Ubuntu – Install APC with PHP-FPM and Nginx
- Ubuntu – Install Memcached with PHP-FPM and Nginx
It’s time to start the Drupal installation.
1. Go to the /srv folder and download the latest Drupal core.
2. Extract the archive.
- tar zxf drupal-7.19.tar.gz
3. Rename the folder to a proper name. In this post, we rename it to drupal.
- mv drupal-7.19 drupal
4. Create a new database through phpMyAdmin.
5. Create a new Nginx VirtualHost setting as follow.
/etc/nginx/sites-available/drupal
server {
listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
server_name <your domain>;
root /srv/drupal;
index index.php;
# Log
access_log /var/log/nginx/drupal.access.log;
error_log /var/log/nginx/drupal.error.log info;
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# This matters if you use drush
location = /backup {
deny all;
}
# Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
allow 127.0.0.1;
deny all;
}
location ~ \..*/.*\.php$ {
return 403;
}
location / {
# This is cool because no php is touched for static content
try_files $uri $uri/ @rewrite;
expires max;
}
location @rewrite {
# Some modules enforce no slash (/) at the end of the URL
# Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
location ~ \.php$ {
# Setup var defaults
set $no_cache "";
# If non GET/HEAD, don't cache and mark user as uncacheable for 1 second via cookie
if ($request_method !~ ^(GET|HEAD)$) {
set $no_cache "1";
}
# Drop no cache cookie if need be
# (for some reason, add_header fails if included in prior if-block)
if ($no_cache = "1") {
add_header Set-Cookie "_mcnc=1; Max-Age=2; Path=/";
add_header X-Microcachable "0";
}
# Bypass cache if no-cache cookie is set
if ($http_cookie ~* "_mcnc") {
set $no_cache "1";
}
# Bypass cache if flag is set
fastcgi_no_cache $no_cache;
fastcgi_cache_bypass $no_cache;
# Settings
fastcgi_cache microcache;
fastcgi_cache_key $server_name|$request_uri;
fastcgi_cache_valid 404 30m;
fastcgi_cache_valid 200 10s;
fastcgi_max_temp_file_size 1M;
fastcgi_cache_use_stale updating;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_pass_header Set-Cookie;
fastcgi_pass_header Cookie;
fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
#fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
#fastcgi_intercept_errors on;
include fastcgi_params;
}
}
6. Restart Nginx.
- /etc/init.d/nginx restart
7. Continue the installation by accessing the URL with browser.
Done =)
Reference:
Drupal Blogs, Pictures, and more on WordPress: SEO Checklist
Today has been pretty productive in regards to the SEO checklist. I spent many hours on this today. Here is what I have done.
- Install Administration menu module – Easy choice.
- Install Elements module. – No. Don’t believe I’ll need it at this point.
- Install Security Review module – Security is good. installed
- Install Module Filter module – Should be core.
- Configure Page Title module – Doing this instead of Meta tags.
- Google/Bing stuff – Do it all. Including the analytics stuff. Why not? I’ve had Google and Live IDs for years now anyway.
- Install Context Keywords module – not but sounds really cool. Present differnet options based on what they searched for.
- Install Meta tags – No.
- Install Scheduler module – Easy choice.
- Install HTML Purifier module. – Not enough people use it yet.
- Install Search 404 module – Yes. Cool mod.
- Install SEO Compliance Checker module – No
- Install Read More Link module – No
- Validate and check broken links – don’t have enough content to do this now. Will do it later.
- Submit site to search engines – Bing and Google. I didn’t have to do this in all the ways that the modules do. I have access to the html root so I just uploaded the verification file myself.
- Install AddThis module – only one that i went with for Social Media. There are several choices. I believe this one to be the best.
Read all that you can on this stuff. the list is great but you need to be educated on the subject to do it properly.
Tomorrow, I configure Mollom. I’ve done it before and it isn’t too bad.
Drupal Blogs, Pictures, and more on WordPress: CMS Experience
Presently, the CMSs I’ve worked with are WordPress, Joomla, and Drupal. I’ve had very diverse experiences with each, and working with them presents an entirely new mindset when it comes to development.
Drupal: I haven’t done much past installation and some research into customization and plugins. Drupal comes off as very heavy and difficult to use; however, it also seems extremely powerful. For large projects that call for complex functionality or intricate user databases, I think Drupal would be an ideal solution.
Joomla: I have installed Joomla as well as update Joomla-powered websites. I found the back-end page structure to be confusing, so my experience wasn’t favorable. That being said, this was likely caused by the developer who made the site (additionally, it was a very old version of Joomla… as in Joomla announced it would no longer be supporting that version around that time). It seems relatively simple in terms of handing off websites to clients, so I think it’s worth exploring the interface again.
WordPress: I have installed, built sites with, themed, and maintained WordPress. This is likely a factor of the large WP community, but there is a very strong sense of design and development, which is very attractive to me. With such a large community, there are a lot of resources and support for all ranges of development knowledge. In creating WP sites for those with little to no knowledge of web, I’ve found difficulty in explaining things like shortcodes, even with documentation. Overall, WP is a wonderful solution that has a strong community.
Drupal Blogs, Pictures, and more on WordPress: SEO Modules for Production
This references my post – Production Change Request – Modules for SEO.
I am now installing and enabling choice modules for SEO. Some of the big issues that I have read about concern path redirection, aliasing and multilingual capability. So I am going to avoid pathauto and global redirect and others that are similar. There also is a warning about using the Title Module and Meta Tags together as they do some of the same things. Buyer beware.
SEO is important of course, but since I’m aiming at a niche market so to speak, it isn’t so critical that I “beat” the competition in page rankings as it would be in other industries. Do your research and check out all the great SEO sites available out there to customize a plan for yourself. Will add to this post in a bit.
Drupal Blogs, Pictures, and more on WordPress: More SEO for tomorrow
Well, I didn’t get as much done today as I would have liked. Seems to be that way a lot. Aim high I suppose.
Tomorrow I will be finishing up the SEO stuff. Installing the modules on Prod, configing. And adding the info from Google and Bing. Those are some of the real keys. But…
The number one key is content. Make sure that you have something to say, that it is relevant and informative. I never expected this blog to be anything more than a sounding board for my ideas on what to do with Drupal. And while it has succeeded there, it has also attracted some attention. Which, I would like to thank those folk for. That in itself has helped me hone out some of my ideas.
CharDUG: Drupalize.Me Podcast 10: Becoming a Drupal Code Contributor
This podcast episode is a great listen if you want to learn about contributing to Drupal (contrib and core). Make sure to check it out: http://www.lullabot.com/podcasts/drupalizeme-podcast-10-becoming-drupal-...
Drupal Blogs, Pictures, and more on WordPress: why are website updates like pulling teeth?
Drupal Blogs, Pictures, and more on WordPress: Hermit Studio Has Upgraded To VPS With A Multi-site Drupal Core
Multi-site Drupal Core at Hermit Studio
There hasn’t been a lot of general studio news to report lately that hasn’t been touched on in the various other project division blogs we have. Since Mr Rabbit’s Big Adventure came to Hermit Studio we have also been working on moving our Web Hosting from a Shared Server to a Virtual Private Server or VPS.
We now own over 50 domains and plan to upgrade our sites to using a Multi-site Drupal Core instead of bespoke PHP script or WordPress blogs. As and when we rework each site, we shall move them over to the new VPS. This will let the websites run faster and take more traffic. Of course any client websites will also benefit from the upgrade too.
We have fallen in love with Drupal and we now want to specialise in CMS Web Development, whilst using our PHP skills to customise things when we need it. This is a big step for Hermit Studio toward expanding our web-presence over the coming year.
Drupal Blogs, Pictures, and more on WordPress: Themes, SEO and Aggregator items
Today I am working on getting my Prod site to a point where I can leave it up and running in a relatively functional state while I work on the real theming dev work in my sandbox. I’ll also begin working on some SEO stuff today for the prod site.
I guess that it is worth mentioning that while my Prod site does exist, I haven’t mentioned the URL Nor the nature of the site. It isn’t really ready for prime time yet. It is close but not quite. and when I say that, I mean in a relatively workable state. The prod site itself will still take months before I am completely through with it. But soon it will be at a point where I’ll feel more comfortable with its availability.
I do plan on working on some SEO stuff today. If you want to learn about SEO, analytics and all that, just google the term. I have learned a lot from this (and the other two blogs I keep) blog and its very helpful info for Google and Bing. If you want to learn this stuff, start a WordPress blog. They are free and the experience has been a lot of fun.
So, I have a base Adaptive Theme subtheme enabled for the site. It is very bare, almost like the Stark theme, but fine for what I need right now. Now that I have that in place and I am comfortable with what those who might stumble on it may see, I’ll be working on the real theming in the sandbox.
And all that begs a question; how much do you really keep sand and quality in line? if you do it all manually, you might get a benefit from the repeated process of implementation. But it also means a lot of work. My ideas are based around refreshing quality from sand via a file copy of the VM files. I think i might script a copy. i’ll work out the details and post later.

