Monthly Archives: April 2015

FreeBSD10.1: separate static access and script (php) access for nginx

This article is based on the php fourm Discuz (http://www.discuz.net), you should modify the configuration as needed.

Operation system: Freebsd 10.1 with ZFS

1. Enable httpready, aio, tmpfs

2. Create tmp mount point for nginx

3. Nginx configuration (nginx version 1.6)

compile nginx from port

make sure that you have enabled below modules:

create log folder

below is the configuration for nginx. Please be aware that I put the configuration in several different files.

main:

events:

http:

I will use map.conf and front.conf to separate static access and script access, also separate human access and robot access.

Use map.conf to sort out different access type:

map.conf:

Use LUA to identify the robots which pretend to be a web browser

cookie.conf (for this script, please refer to http://ocdn.me/nginx-defense.html)

Front.conf

upstream.conf

site/yourdomain.conf

logorotate

With this configuration, you can set different access rules for human access and bot access, you can also seperate static file access and script(php) access. It can spped up your website and improve the workload of your server.

Provisioning Services (PVS) and Daylight-Saving Time

With daylight-saving time beginning at week’s end (March 8 at 2am), we got some issues that can occur with PVS delivered desktops and XenApp servers.

Some of the issues that occur as a result of the time change are:

Time not showing correctly in the Desktop or XenApp server,
Desktop failure to register with DDCs,
User inability to log on due to domain trust relationship issues caused by the VM/Domain time difference.

The Fix:

Open up your PVS delivered image(s) in read/write mode after the time change has occurred on Sunday.
Run “w32tm /resync /nowait” at the command prompt.
Set the image(s) back to read only, following your normal image preparation procedures.

Remember, you must reboot all PVS delivered desktops and servers after you make the above changes to ensure they receive the updated version.

Being proactive will help ensure a smooth Monday morning for all of your users!

More information on this issue can be viewed here: http://support.citrix.com/article/CTX200058