From b14f60e08b143e3ba564ae5f083a073f497e2735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yi=C4=9Fit=20Kerem=20Oktay?= Date: Fri, 14 Aug 2020 14:58:05 +0300 Subject: [PATCH 1/4] Add some required info for creating server config --- config.php.template | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/config.php.template b/config.php.template index 7398465..511f9ba 100644 --- a/config.php.template +++ b/config.php.template @@ -1,7 +1,20 @@ connect_errno) { exit(); } -$mysqli->set_charset("utf8"); \ No newline at end of file +$mysqli->set_charset("utf8"); From 34e3782a61cc3f9c9a9154648bdcf5c19af737ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yi=C4=9Fit=20Kerem=20Oktay?= Date: Fri, 14 Aug 2020 15:11:42 +0300 Subject: [PATCH 2/4] Add additional info --- config.php.template | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/config.php.template b/config.php.template index 511f9ba..0dba3bc 100644 --- a/config.php.template +++ b/config.php.template @@ -3,14 +3,20 @@ // SERVER STATUS CONFIG FILE TEMPLATE // THIS FILE IS FOR CREATING YOUR CONFIG MANUALLY // !!!!!!!IMPORTANT NOTE!!!!!!!!! -// You will need to create your htaccess or web.config file yourself. +// You will need to create your htaccess or web.config file yourself if you use this template // Please head to http(s)://yourdomain.com/create-server-config.php // Wait until script finishes. // Then delete it from your document root. -// We are sorry for this inconvinience and we will be automating this process soon. -// ------------------------ +// If you don't want to allow php to access your root directory or if you have permission +// issues please follow the steps below. +// -------------------------- +// FOR IIS: +// Rename IISWebConfig to web.config +// FOR Apache and Nginx +// Rename ApacheHtaccess to .htaccess +// -------------------------- // Contributors: -// Vojtěch Sajdl - Yigit Kerem Oktay - Thomas Nilsen - jhuesser +// Vojtěch Sajdl - Yigit Kerem Oktay - Thomas Nilsen - jhuesser /**************************************************************************************/ session_start(); From af2f8969eb0b7b051ae0596bc78b6edcd4401044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yi=C4=9Fit=20Kerem=20Oktay?= Date: Fri, 14 Aug 2020 15:12:30 +0300 Subject: [PATCH 3/4] Create ApacheHtaccess --- ApacheHtaccess | 106 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 ApacheHtaccess diff --git a/ApacheHtaccess b/ApacheHtaccess new file mode 100644 index 0000000..21274c1 --- /dev/null +++ b/ApacheHtaccess @@ -0,0 +1,106 @@ +ErrorDocument 404 /404.php + + Header set X-UA-Compatible "IE=edge" + + Header unset X-UA-Compatible + + + + #DELETE THIS IF YOU DON'T HAVE HTTPS! + RewriteEngine On + RewriteCond %{HTTP:X-Forwarded-Proto} !https + RewriteCond %{HTTPS} off + RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] + + + Header set X-Content-Type-Options "nosniff" + + + + + SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding + RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding + + + + AddOutputFilterByType DEFLATE "application/atom+xml" \ + "application/javascript" \ + "application/json" \ + "application/ld+json" \ + "application/manifest+json" \ + "application/rdf+xml" \ + "application/rss+xml" \ + "application/schema+json" \ + "application/vnd.geo+json" \ + "application/vnd.ms-fontobject" \ + "application/x-font-ttf" \ + "application/x-javascript" \ + "application/x-web-app-manifest+json" \ + "application/xhtml+xml" \ + "application/xml" \ + "font/eot" \ + "font/opentype" \ + "image/bmp" \ + "image/svg+xml" \ + "image/vnd.microsoft.icon" \ + "image/x-icon" \ + "text/cache-manifest" \ + "text/css" \ + "text/html" \ + "text/javascript" \ + "text/plain" \ + "text/vcard" \ + "text/vnd.rim.location.xloc" \ + "text/vtt" \ + "text/x-component" \ + "text/x-cross-domain-policy" \ + "text/xml" + + + AddEncoding gzip svgz + + + Header unset ETag + +FileETag None + + ExpiresActive on + ExpiresDefault "access plus 1 month" + ExpiresByType text/css "access plus 1 year" + ExpiresByType application/atom+xml "access plus 1 hour" + ExpiresByType application/rdf+xml "access plus 1 hour" + ExpiresByType application/rss+xml "access plus 1 hour" + ExpiresByType application/json "access plus 0 seconds" + ExpiresByType application/ld+json "access plus 0 seconds" + ExpiresByType application/schema+json "access plus 0 seconds" + ExpiresByType application/vnd.geo+json "access plus 0 seconds" + ExpiresByType application/xml "access plus 0 seconds" + ExpiresByType text/xml "access plus 0 seconds" + ExpiresByType image/vnd.microsoft.icon "access plus 1 week" + ExpiresByType image/x-icon "access plus 1 week" + ExpiresByType text/html "access plus 0 seconds" + ExpiresByType application/javascript "access plus 1 year" + ExpiresByType application/x-javascript "access plus 1 year" + ExpiresByType text/javascript "access plus 1 year" + ExpiresByType application/manifest+json "access plus 1 year" + ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds" + ExpiresByType text/cache-manifest "access plus 0 seconds" + ExpiresByType audio/ogg "access plus 1 month" + ExpiresByType image/bmp "access plus 1 month" + ExpiresByType image/gif "access plus 1 month" + ExpiresByType image/jpeg "access plus 1 month" + ExpiresByType image/png "access plus 1 month" + ExpiresByType image/svg+xml "access plus 1 month" + ExpiresByType video/mp4 "access plus 1 month" + ExpiresByType video/ogg "access plus 1 month" + ExpiresByType video/webm "access plus 1 month" + ExpiresByType application/vnd.ms-fontobject "access plus 1 month" + ExpiresByType font/eot "access plus 1 month" + ExpiresByType font/opentype "access plus 1 month" + ExpiresByType application/x-font-ttf "access plus 1 month" + ExpiresByType application/font-woff "access plus 1 month" + ExpiresByType application/x-font-woff "access plus 1 month" + ExpiresByType font/woff "access plus 1 month" + ExpiresByType application/font-woff2 "access plus 1 month" + ExpiresByType text/x-cross-domain-policy "access plus 1 week" + From d538f7d358c6e8f461eae8794286eca38c9c84fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yi=C4=9Fit=20Kerem=20Oktay?= Date: Fri, 14 Aug 2020 15:13:12 +0300 Subject: [PATCH 4/4] Create IISWebConfig --- IISWebConfig | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 IISWebConfig diff --git a/IISWebConfig b/IISWebConfig new file mode 100644 index 0000000..ae33314 --- /dev/null +++ b/IISWebConfig @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + +