proxy_cache ramdisk

AMP Admin admin at ampprod.com
Mon Feb 1 19:06:27 MSK 2010


Oh and I added the following to the nginx startup script so it will always create the ram drives if they don't already exsist when nginx starts.  Not sure if that helps anyone else or not.

Obviously change the path and name to your config.  This is a centos box.

start() {
    if /bin/mount | grep temp_cache ; then
        echo "is mounted"
    else
        echo "Mounting nginx Temp Cache"
        mount -t tmpfs none /etc/nginx/temp_cache -o size=128m
    fi

    if /bin/mount | grep nginx_cache ; then
        echo "is mounted"
    else
        echo "Mounting Nginx Cache"
        mount -t tmpfs none /etc/nginx/nginx_cache -o size=128m
    fi




More information about the nginx mailing list