User Tools

Site Tools


usage

Before Installing Doyosi

You must choose in which platform will you use doyosi?

For Apache;

Just upload .htaccess file to your main dir.

Default .htaccess file

<IfModule mod_rewrite.c>
Options -Indexes +FollowSymlinks
RewriteEngine On

# RewriteBase /
<Files ~ ".*\.ini|data\/|.*\.doyosi|.*\.json">
  Deny from all
</Files>

RewriteRule ^(tmp)\/|(data)\/|(upload_data)\/|\.ini$ - [R=404]
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L,QSA] 
</IfModule>        

For nginx minimum settings are;


server {
    listen   80;
    root /your site folder/;
    server_name yoursite.com;
    location / {
        index index.php index.html index.htm;
        try_files $uri /index.php?$query_string;
    }
    location ~ \.php$ {
        fastcgi_pass unix:/var/run/php5-fpm.sock; 
        #or php7 
        #fastcgi_pass unix:/var/run/php7.0-fpm.sock; 
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}

Enable Gzip

If you want to use gzip encoding you need to change your gzip settings. for Apache;

Add this codes to your .htaccess file

<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>

for Nginx;

gzip on;
gzip_proxied any;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/font-woff2 font/opentype application/font-woff;
gzip_vary on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";