diff options
| -rw-r--r-- | public/.htaccess | 114 | ||||
| -rw-r--r-- | public/app/views/components/header_includes.php | 10 | ||||
| -rw-r--r-- | public/app/views/user/login.php | 2 | ||||
| -rw-r--r-- | public/app/views/user/update_properties.php | 2 | ||||
| -rw-r--r-- | public/assets/media/credits.txt | 3 | ||||
| -rw-r--r-- | sceleton.txt | 42 |
6 files changed, 145 insertions, 28 deletions
diff --git a/public/.htaccess b/public/.htaccess index f4ddf81..fbc5167 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -1,5 +1,58 @@ ## Introduce the Server -Header add Origin-Name geone +Header add Origin-Name coder + +<IfModule mod_mime.c> + + # # Data interchange + # + # # 2.2.x+ + # AddType text/xml xml + # # 2.2.x - 2.4.x + # AddType application/json json + # AddType application/rss+xml rss + # # 2.4.x+ + # AddType application/json map + # + # # JavaScript + # # 2.2.x+ + # # See: https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguages. + AddType apprication/javascript js mjs + + # # Manifest files + # # 2.2.x+ + # AddType application/manifest+json webmanifest + # AddType text/cache-manifest appcache + # + # # Media files + # # 2.2.x - 2.4.x + # AddType audio/mp4 f4a f4b m4a + # AddType audio/ogg oga ogg spx + # AddType video/mp4 mp4 mp4v mpg4 + # AddType video/ogg ogv + # AddType video/webm webm + # AddType video/x-flv flv + # # 2.2.x+ + # AddType image/svg+xml svgz + # AddType image/x-icon cur + # # 2.4.x+ + AddType image/webp webp + + # # Web fonts + # # 2.2.x - 2.4.x + # AddType application/vnd.ms-fontobject eot + # # 2.2.x+ + AddType font/woff woff + AddType font/woff2 woff2 + AddType font/ttf ttf + AddType font/collection ttc + AddType font/otf otf + + # # Other + # # 2.2.x+ + # AddType text/vtt vtt + +</IfModule> + ### Deny access to specific folders @@ -56,38 +109,49 @@ AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/javascript +AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE application/x-javascript AddOutputFilterByType DEFLATE application/json + ### ### CACHE-CONTROL HEADERS -### -### # CACHE-CONTROL IMAGES 100days -### #: <filesMatch ".(jpg|jpeg|png|gif|ico)$"> -### <filesMatch ".(jpg|jpeg)$"> + +# CACHE-CONTROL IMAGES 100days +### <filesMatch ".(jpg|jpeg|png|webp|gif|ico)$"> ### Header set Cache-Control "max-age=8640000, public" ### </filesMatch> -### -### # CACHE-CONTROL CSS and JS 30days -### #: <filesMatch ".(css|js)$"> -### #: Header set Cache-Control "max-age=2592000, public" -### #: </filesMatch> -### + +# CACHE-CONTROL FONTS 200days +### <filesMatch ".(ttf|woff|woff2)$"> +### Header set Cache-Control "max-age=17280000, public" +### </filesMatch> + +# CACHE-CONTROL CSS and JS 30days +### <filesMatch ".(css|js)$"> +### Header set Cache-Control "max-age=2592000, public" +### </filesMatch> + ### ### EXPIRATION DATES -### -### # EXPIRATION DATE BY TYPE + +# EXPIRATION DATE BY TYPE ### <IfModule mod_expires.c> ### ExpiresActive On -### +### ### # Default directive ### ExpiresDefault "access plus 0 seconds" -### +### ### # My Fav-icon and Images -### ExpiresByType image/x-icon "access plus 1 month" -### ExpiresByType image/gif "access plus 1 month" -### ExpiresByType image/png "access plus 1 month" -### ExpiresByType image/jpg "access plus 1 month" -### ExpiresByType image/jpeg "access plus 1 month" -### +### ExpiresByType image/x-icon "access plus 100 days" +### ExpiresByType image/gif "access plus 100 days" +### ExpiresByType image/png "access plus 100 days" +### ExpiresByType image/jpg "access plus 100 days" +### ExpiresByType image/jpeg "access plus 100 days" +### ExpiresByType image/webp "access plus 100 days" +### +### # Fonts +### ExpiresByType font/woff2 "access plus 200 days" +### ExpiresByType font/ttf "access plus 200 days" +### ### # CSS ### #: ExpiresByType text/css "access plus 1 month" ### # Javascript @@ -95,5 +159,11 @@ AddOutputFilterByType DEFLATE application/json ### </IfModule> ### ### -### # Remove Server's Signature +# Remove Server's Signature ### ServerSignature Off + +# also check: +# TODO: MOVE MOST INTO *.conf file +# + https://stackoverflow.com/questions/10816808/header-expires-not-working +# + https://linuxdigest.com/howto/how-to-set-max-age-in-apache2-cache-control-headers/ +# + https://serverfault.com/questions/363692/apache-deflate-ignores-javascript
\ No newline at end of file diff --git a/public/app/views/components/header_includes.php b/public/app/views/components/header_includes.php index c096bd5..9e1d239 100644 --- a/public/app/views/components/header_includes.php +++ b/public/app/views/components/header_includes.php @@ -6,6 +6,10 @@ if (!isset($no_dataTables)) { $no_dataTables = false; } + + if (!isset($no_pdfmake)) { + $no_pdfmake = false; + } ?> <!-- FONTS and LIBRARY CSS (self-hosted) @@ -20,8 +24,10 @@ <!-- bootstrap --> <link rel="stylesheet" href="/assets/css/bootstrap-5.3.0/css/bootstrap.min.css"> +<?php if (!$no_dataTables) : ?> <!-- datatables css --> -<link rel="stylesheet" href="/assets/js/DataTables/datatables.min.css"> + <link rel="stylesheet" href="/assets/js/DataTables/datatables.min.css"> +<?php endif; ?> <!-- select2 css --> <link rel="stylesheet" href="/assets/js/select2-4.1.0-rc0/css/select2.min.css"> @@ -58,7 +64,7 @@ <?php if (!$no_dataTables) : ?> <!-- DataTables js --> -<script src="/assets/js/DataTables/datatables.min.js"></script> + <script src="/assets/js/DataTables/datatables.min.js"></script> <?php endif; ?> <!-- select2-4.1.0-rc.0 js --> diff --git a/public/app/views/user/login.php b/public/app/views/user/login.php index a9517c6..169a72b 100644 --- a/public/app/views/user/login.php +++ b/public/app/views/user/login.php @@ -6,7 +6,7 @@ <?php // header includes //////////////////////////////////////////////////////////////////////// - Render::view('components/header_includes'); + Render::view('components/header_includes', [ 'no_dataTables' => true ]); ?> <style> :root { /* login-form overides */ diff --git a/public/app/views/user/update_properties.php b/public/app/views/user/update_properties.php index 7da976d..363016a 100644 --- a/public/app/views/user/update_properties.php +++ b/public/app/views/user/update_properties.php @@ -46,7 +46,7 @@ <?php // include select2 supplementary functions //////////////////////////////////////////////////////////////////////////// - Render::view('js/select2-supplementary'); + Render::view('js/select2-supplementary', [ 'no_dataTables' => true ]); ?> <script> diff --git a/public/assets/media/credits.txt b/public/assets/media/credits.txt index 546529f..593cc17 100644 --- a/public/assets/media/credits.txt +++ b/public/assets/media/credits.txt @@ -25,8 +25,7 @@ https://unsplash.com/photos/2s3fI3M1lO0 ++ https://unsplash.com/photos/qfntmjboDyc : Ko Hong, Thailand ++ https://unsplash.com/photos/GlJDbNpRZzI : Quảng Ninh, Vietnam +? https://unsplash.com/photos/J_C3_JpJMms : Mount Fuji, Kitayama, Fujinomiya, Japon -++ https://unsplash.com/photos/yzkoleKww6w : Himalayas -++ https://unsplash.com/photos/dg4AfLITDH8 : Hạ Long Bay, Vietnam +++ https://unsplash.com/photos/dg4AfLITDH8 : Hạ Long Bay, Vietnam ++ ++ https://unsplash.com/photos/prBOww8R1Js : Mining Town, Ipoh, Malaysia ++ https://unsplash.com/photos/o3Z8qhsWdiU : Bhigwan, India -> text:#fed ++ https://unsplash.com/photos/cIYep5O1pn8 : Java, Indonesië ++ diff --git a/sceleton.txt b/sceleton.txt index 0e7bb5e..bf6dc61 100644 --- a/sceleton.txt +++ b/sceleton.txt @@ -77,3 +77,45 @@ -> + + + +<IfModule mod_ssl.c> +<VirtualHost *:443> + + <Directory /var/www/gyraf1gov/public> + Options Indexes FollowSymLinks MultiViews + AllowOverride All + Order allow,deny + allow from all + </Directory> + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + +SSLCertificateFile /etc/letsencrypt/live/office.gymrafin.gr/fullchain.pem +SSLCertificateKeyFile /etc/letsencrypt/live/office.gymrafin.gr/privkey.pem +Include /etc/letsencrypt/options-ssl-apache.conf +</VirtualHost> +</IfModule> + + + +<IfModule mod_ssl.c> +<VirtualHost *:443> + + <Directory /var/www/classroom/public> + Options Indexes FollowSymLinks MultiViews + AllowOverride All + Order allow,deny + allow from all + </Directory> + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + +SSLCertificateFile /etc/letsencrypt/live/classroom.roptron.gr/fullchain.pem +SSLCertificateKeyFile /etc/letsencrypt/live/classroom.roptron.gr/privkey.pem +Include /etc/letsencrypt/options-ssl-apache.conf +</VirtualHost> +</IfModule> |
