feat: add server configuration templates and custom error/index assets
This commit is contained in:
@@ -1,10 +1,26 @@
|
||||
# 1. PHP-FPM bağlantısını temiz ve stabil bir Proxy bloğu olarak tanımlayın
|
||||
<Proxy "fcgi://127.0.0.1:{{PHP_PORT}}">
|
||||
ProxySet timeout=600 connectiontimeout=600
|
||||
</Proxy>
|
||||
|
||||
# 2. Alias tanımı (Sonunda ASLA eğik çizgi '/' olmamalı)
|
||||
Alias /{{HOST}} "{{PATH}}"
|
||||
|
||||
<Directory "{{PATH}}">
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
|
||||
<FilesMatch \.php$>
|
||||
# 3. Windows Path Sorununu Çözen Komut (Sadece bu klasöre özel zorluyoruz)
|
||||
<IfModule proxy_fcgi_module>
|
||||
ProxyFCGIBackendType GENERIC
|
||||
</IfModule>
|
||||
|
||||
# 4. Klasör direkt çağrıldığında index.php'yi bulmasını garanti edin
|
||||
DirectoryIndex index.php index.html
|
||||
|
||||
# 5. PHP Dosyalarını Yönlendirme
|
||||
<FilesMatch "\.php$">
|
||||
SetHandler "proxy:fcgi://127.0.0.1:{{PHP_PORT}}/"
|
||||
</FilesMatch>
|
||||
</Directory>
|
||||
@@ -91,3 +91,25 @@ Alias /phpmyadmin "{{PHPMYADMIN_DIR}}"
|
||||
|
||||
# Project configurations
|
||||
{{PROJECTS}}
|
||||
|
||||
# Custom Server Assets (Logos, CSS, Error Pages)
|
||||
Alias /server-assets "D:/Works/2026/multiphp/public/server-assets"
|
||||
<Directory "D:/Works/2026/multiphp/public/server-assets">
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride None
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
# Error Pages
|
||||
ErrorDocument 404 /server-assets/404.html
|
||||
ErrorDocument 500 /server-assets/500.html
|
||||
ErrorDocument 403 /server-assets/404.html
|
||||
ErrorDocument 502 /server-assets/500.html
|
||||
ErrorDocument 503 /server-assets/500.html
|
||||
ErrorDocument 504 /server-assets/500.html
|
||||
|
||||
# Custom Directory Listing (Index of)
|
||||
IndexOptions +HTMLTable +IconHeight=16 +IconWidth=16 +SuppressRules +SuppressDescription +NameWidth=* +FoldersFirst +ScanHTMLTitles +CharSet=UTF-8
|
||||
IndexStyleSheet "/server-assets/style.css"
|
||||
HeaderName "/server-assets/header.html"
|
||||
ReadmeName "/server-assets/footer.html"
|
||||
|
||||
@@ -36,6 +36,19 @@ http {
|
||||
return 404;
|
||||
}
|
||||
|
||||
# Custom Server Assets (Logos, CSS, Error Pages)
|
||||
location /server-assets/ {
|
||||
alias "D:/Works/2026/multiphp/public/server-assets/";
|
||||
access_log off;
|
||||
allow all;
|
||||
}
|
||||
|
||||
# Error Pages
|
||||
error_page 404 /server-assets/404.html;
|
||||
error_page 500 502 503 504 /server-assets/500.html;
|
||||
location = /server-assets/404.html { internal; }
|
||||
location = /server-assets/500.html { internal; }
|
||||
|
||||
{{PROJECTS}}
|
||||
|
||||
location /phpmyadmin {
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>404 Not Found - Multi-PHP</title>
|
||||
<link rel="stylesheet" href="/server-assets/style.css">
|
||||
<link rel="icon" href="/server-assets/icon.svg" type="image/svg+xml">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container error-container">
|
||||
<header>
|
||||
<a href="/">
|
||||
<img src="/server-assets/logo.svg" alt="Multi-PHP" class="logo logo-dark">
|
||||
<img src="/server-assets/logo-light.svg" alt="Multi-PHP" class="logo logo-light">
|
||||
</a>
|
||||
</header>
|
||||
<div class="error-code">404</div>
|
||||
<div class="error-content">
|
||||
<h1 class="error-title">Page Not Found</h1>
|
||||
<p class="error-msg">The resource you requested could not be found on this server. It might have been moved or doesn't exist.</p>
|
||||
<a href="/" class="btn">Return to Safety</a>
|
||||
</div>
|
||||
</div>
|
||||
<footer>
|
||||
<p>© 2026 <strong>Multi-PHP</strong> - Powering PHP Development.</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>500 Internal Server Error - Multi-PHP</title>
|
||||
<link rel="stylesheet" href="/server-assets/style.css">
|
||||
<link rel="icon" href="/server-assets/icon.svg" type="image/svg+xml">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container error-container">
|
||||
<header>
|
||||
<a href="/">
|
||||
<img src="/server-assets/logo.svg" alt="Multi-PHP" class="logo logo-dark">
|
||||
<img src="/server-assets/logo-light.svg" alt="Multi-PHP" class="logo logo-light">
|
||||
</a>
|
||||
</header>
|
||||
<div class="error-code">500</div>
|
||||
<div class="error-content">
|
||||
<h1 class="error-title">Internal Server Error</h1>
|
||||
<p class="error-msg">The server encountered an error while processing your request. Please check the logs for more details.</p>
|
||||
<a href="/" class="btn">Try Again</a>
|
||||
</div>
|
||||
</div>
|
||||
<footer>
|
||||
<p>© 2026 <strong>Multi-PHP</strong> - Powering PHP Development.</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,7 @@
|
||||
</div> <!-- .index-content -->
|
||||
</div> <!-- .container -->
|
||||
<footer>
|
||||
<p>© 2026 <strong>Multi-PHP</strong> - Powering PHP Development with truncgil-server.</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Directory Listing - Multi-PHP</title>
|
||||
<link rel="stylesheet" href="/server-assets/style.css">
|
||||
<link rel="icon" href="/server-assets/icon.svg" type="image/svg+xml">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container index-listing">
|
||||
<header>
|
||||
<a href="/">
|
||||
<!-- Dark mode logo (shown when theme is light) -->
|
||||
<img src="/server-assets/logo.svg" alt="Multi-PHP" class="logo logo-dark">
|
||||
<!-- Light mode logo (shown when theme is dark) -->
|
||||
<img src="/server-assets/logo-light.svg" alt="Multi-PHP" class="logo logo-light">
|
||||
</a>
|
||||
<h1>Index of /</h1>
|
||||
</header>
|
||||
<div class="index-content">
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Creator: CorelDRAW -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="134.816mm" height="134.816mm" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"
|
||||
viewBox="0 0 2611.47 2611.47"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xodm="http://www.corel.com/coreldraw/odm/2003">
|
||||
<defs>
|
||||
<style type="text/css">
|
||||
<![CDATA[
|
||||
.fil0 {fill:none}
|
||||
.fil2 {fill:#153E5E}
|
||||
.fil1 {fill:#4A7CA3}
|
||||
]]>
|
||||
</style>
|
||||
</defs>
|
||||
<g id="Layer_x0020_1">
|
||||
<metadata id="CorelCorpID_0Corel-Layer"/>
|
||||
<rect class="fil0" x="-0" y="-0" width="2611.47" height="2611.47"/>
|
||||
<g id="_2472301098192">
|
||||
<path class="fil1" d="M1306.48 237.97c194.46,162.17 391.81,273.55 641.12,345.94 43.54,12.64 87.1,24.55 131.37,34.14 31.53,6.83 112.6,16 136.33,25.1 24.03,182.74 4.39,452.05 -32.33,623.08 -20.47,95.35 -44.74,176.01 -74.94,261.64 -41.57,117.85 -126.77,282.1 -204.18,381.09 -12.62,16.14 -23.7,32.32 -36.17,47.9 -51.41,64.29 -144.33,163.58 -206.65,213.76 -15.33,12.34 -30.17,23.69 -47,37.09 -67.56,53.78 -239.27,173.41 -308.59,197.18l-0.05 73.36c0.21,24.23 2.85,55.66 0.64,78.19l131.29 -65.78c154.48,-91.3 238.69,-150.14 366.82,-264.23 9.08,-8.08 14.36,-16.49 23.63,-24.84l96.11 -98.06c295.07,-332.43 429.55,-768.25 436.71,-1213.62 1.12,-69.52 -1.98,-311.75 -21.15,-367.4 -54.71,-9.45 -109.74,-15.42 -163.2,-24.61 -307.75,-52.95 -535.06,-168.26 -770.83,-355.05 -17.48,-13.85 -84.44,-70.37 -96.86,-87.85l-6.35 3.39c9.89,7.57 2.06,-2.77 4.01,9.94l-1.07 77.55c-0.5,29.47 -0.34,63.1 1.33,92.07z"/>
|
||||
<path class="fil1" d="M1149.94 1391.32l158.69 -2.62c-4.95,24.97 -4.03,120.24 -3.1,154.68 0.24,8.76 0.67,17.14 1.14,25.87 0.5,9.19 0.71,12.68 -4.48,19.7 183.12,-3.59 295.04,-29.36 428.46,-141.13 9.96,-8.34 9.28,-8.64 16.91,-18.77 15.48,-20.54 17.72,-13.7 46.74,-60.06 66.24,-105.83 82.01,-223.22 56.4,-348.15 -15.89,-77.5 -67.88,-134.16 -116.01,-168.87 -54.4,-39.23 -130.81,-63.96 -210.45,-73.45 -46.37,-5.53 -542.39,-9.05 -561.95,-2.83 -1.65,2.24 -2.07,2.35 -3.84,6.71 -1.64,4.05 -1.94,5.53 -2.86,10.05 -1.34,6.56 -2.2,14.95 -3.33,22.57l-50.55 295.78c-14.61,88.01 -51.6,262.22 -59.12,338.98l56.43 -47.25c38.63,-29.48 90.42,-54.48 140.15,-66.85 37.6,-9.35 56.12,-10.17 75.4,-14.6l8.19 -2.6c16.19,-5.57 52.71,-331.28 63.53,-340.73 13.75,-5.94 128.78,-1.87 154.69,-1.85 51.09,0.04 102.6,-2.68 148.12,11.97 177.44,57.09 127.52,316.42 -41.22,377.76 -89.58,32.56 -188.3,15.54 -278.54,20.41 -15.09,0.82 -10.77,-1.75 -19.42,5.29z"/>
|
||||
<path class="fil2" d="M1306.48 237.97c-1.67,-28.97 -1.83,-62.6 -1.33,-92.07l1.07 -77.55c-1.96,-12.71 5.88,-2.37 -4.01,-9.94 -38.3,31.85 -56.38,54.5 -98,86.5 -35.58,27.36 -67.05,56.05 -106.45,81.05 -44.4,28.17 -53.94,39.48 -113.88,73.77 -175.06,100.13 -345.78,162 -549.16,198.47 -35.53,6.37 -137.56,14.85 -162.44,24.63 -41.54,233.19 -19,588.9 32.74,820.36 27.06,121.04 68.48,229.39 113.07,336.84 32.69,78.78 71.69,156.4 154.22,182.82 47.21,15.11 56.01,5.94 98.65,-0.83 -6.22,-20.64 -55.22,-92.46 -70.54,-121.36 -22.28,-42.02 -41.7,-81.84 -60.98,-126.6 -85.55,-198.66 -129.87,-390.44 -146.35,-610.96 -6.66,-89.1 -11.15,-276.47 4.48,-361.2 45.12,-9.05 92.56,-14.66 136.75,-24.2 269.06,-58.11 514.14,-173.99 725.96,-342.23l46.22 -37.48z"/>
|
||||
<path class="fil2" d="M1302.2 1588.95c5.19,-7.01 4.98,-10.51 4.48,-19.7 -0.48,-8.73 -0.9,-17.1 -1.14,-25.87 -0.93,-34.44 -1.85,-129.71 3.1,-154.68l-158.69 2.62c-19.34,-10.23 -114.59,16.75 -135.23,25.98 -310.88,138.92 -138.63,409.03 -313.06,505.54 -39.74,21.99 -92.36,23.85 -138.46,9.83 -20.23,-6.15 -40.16,-13.4 -58.15,-22.63 -19.06,-9.77 -34.13,-22.71 -51.45,-31.65 31.82,93.72 107.08,161.93 202.07,185.58 96.19,23.95 224.85,-1 292.9,-68.67 84.32,-83.85 93.08,-145.15 112.91,-268.68 21.51,-134.07 20.89,-145.96 240.73,-137.66z"/>
|
||||
<path class="fil2" d="M1306.03 2556.45c2.21,-22.53 -0.44,-53.96 -0.64,-78.19l0.05 -73.36c-34.48,-12.8 -113.35,-61.59 -143.36,-80.88 -47.41,-30.47 -88.52,-58.43 -131.95,-91.4 -25.66,-19.48 -100.95,-77.27 -122.52,-100.65 -25.31,-27.43 -12.83,-13.7 -79.21,1.58 -37.71,8.68 -60.66,7.92 -98.94,9.95 3.93,11.6 30.66,36.25 46.3,52.45 30.56,31.64 114.04,100.57 147.58,127.4 88.9,71.13 197.15,138.59 299.43,192.43 24.96,13.14 57.22,32.13 83.26,40.66z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.3 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 20 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 21 KiB |
@@ -0,0 +1,172 @@
|
||||
:root {
|
||||
--bg-color: #f8fafc;
|
||||
--text-color: #1e293b;
|
||||
--card-bg: #ffffff;
|
||||
--border-color: #e2e8f0;
|
||||
--accent-color: #3b82f6;
|
||||
--hover-bg: #f1f5f9;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--bg-color: #0f172a;
|
||||
--text-color: #f1f5f9;
|
||||
--card-bg: #1e293b;
|
||||
--border-color: #334155;
|
||||
--accent-color: #60a5fa;
|
||||
--hover-bg: #334155;
|
||||
}
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
background-color: var(--bg-color);
|
||||
color: var(--text-color);
|
||||
line-height: 1.5;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 900px;
|
||||
margin: 2rem auto;
|
||||
padding: 2rem;
|
||||
background: var(--card-bg);
|
||||
border-radius: 1rem;
|
||||
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
header {
|
||||
text-align: center;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
header img.logo {
|
||||
max-width: 250px;
|
||||
height: auto;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
/* For automatic logo switching in dark mode */
|
||||
.logo-light { display: none; }
|
||||
.logo-dark { display: block; }
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.logo-dark { display: none; }
|
||||
.logo-light { display: block; }
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
/* Mod Autoindex Style */
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
th, td {
|
||||
padding: 0.75rem 1rem;
|
||||
text-align: left;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
th {
|
||||
font-weight: 600;
|
||||
color: var(--accent-color);
|
||||
text-transform: uppercase;
|
||||
font-size: 0.75rem;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
tr:hover td {
|
||||
background-color: var(--hover-bg);
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--accent-color);
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.index-icon {
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
margin-right: 0.5rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* Error Pages Specific */
|
||||
.error-container {
|
||||
text-align: center;
|
||||
padding: 3rem 1rem;
|
||||
}
|
||||
|
||||
.error-code {
|
||||
font-size: 8rem;
|
||||
font-weight: 900;
|
||||
color: var(--accent-color);
|
||||
opacity: 0.2;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.error-content {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.error-title {
|
||||
font-size: 2rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.error-msg {
|
||||
color: var(--text-color);
|
||||
opacity: 0.8;
|
||||
max-width: 500px;
|
||||
margin: 0 auto 2rem;
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: inline-block;
|
||||
padding: 0.75rem 1.5rem;
|
||||
background-color: var(--accent-color);
|
||||
color: white !important;
|
||||
border-radius: 0.5rem;
|
||||
font-weight: 600;
|
||||
transition: transform 0.2s;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
transform: translateY(-2px);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
footer {
|
||||
margin-top: auto;
|
||||
padding: 2rem;
|
||||
text-align: center;
|
||||
font-size: 0.875rem;
|
||||
opacity: 0.6;
|
||||
}
|
||||
Reference in New Issue
Block a user