Here are a few example configs for the Apache and Nginx web servers, these are just examples and are not recommended for all use cases
Nginx
Solder server block config
server {
listen 80; #IPv4
listen [::]:80; #IPv6
# Host that will serve this project.
server_name solder.technicpack.net;
# Useful logs for debugging.
access_log /var/log/nginx/solder.technicpack.net_access.log;
error_log /var/log/nginx/solder.technicpack.net_error.log;
rewrite_log on;
# The location of our projects public directory.
root /var/www/solder.technicpack.net/TechnicSolder/public;
index index.php;
location / {
# URLs to attempt, including pretty ones
try_files $uri $uri/ /index.php?$query_string;
}
# PHP FPM configuration.
location ~* \.php$ {
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
include fastcgi_params;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
# We don't need .ht files with nginx.
location ~ /\.ht {
deny all;
}
# Hide dot files/folders
location ~ .*/\. {
return 403;
}
# Set header expirations on per-project basis
location ~* \.(?:ico|css|js|jpe?g|JPG|png|svg|woff)$ {
expires 365d;
}
}
Repo server block config
server {
listen 80; #IPv4
listen [::]:80; #IPv6
# Host that will serve this project.
server_name repo.technicpack.net;
# Useful logs for debug.
access_log /var/log/nginx/repo.technicpack.net_access.log;
error_log /var/log/nginx/repo.technicpack.net_error.log;
rewrite_log on;
# The location of repo directory.
root /var/www/repo.technicpack.net;
index index.php index.html index.htm;
location / {
# URLs to attempt, including pretty ones.
try_files $uri $uri/ =404;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
}
# We don't need .ht files with nginx.
location ~ /\.ht {
deny all;
}
# Hide dot files/folders
location ~ .*/\. {
return 403;
}
# Set header expirations on per-project basis
location ~* \.(?:ico|css|js|jpe?g|JPG|png|svg|woff)$ {
expires 365d;
}
}
Apache
Solder vhost config
<VirtualHost *:80>
# Host that will serve this project.
ServerName solder.technicpack.net
ServerAdmin [email protected]
# The location of public directory.
DocumentRoot /var/www/html/TechnicSolder/public/
# Important options for solder public directory.
<Directory /var/www/html/TechnicSolder/public>
Options FollowSymLinks
AllowOverride All
# requires mod_version
<IfVersion >= 2.4>
Require all granted
</IfVersion>
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
</Directory>
# Useful logs for debug.
ErrorLog ${APACHE_LOG_DIR}/solder_error.log
CustomLog ${APACHE_LOG_DIR}/solder_access.log combined
</VirtualHost>
If the site is inaccessible
Do not modify DocumentRoot to append /index.php but read "Rewrite Engine on Apache" section below.
Repo vhost config
<VirtualHost *:80>
# Host that will serve this project.
ServerName repo.technicpack.net
ServerAdmin [email protected]
# The location of repo directory.
DocumentRoot /var/www/html/repo/
# Important options for solder repo directory.
<Directory /var/www/html/repo>
Options +Indexes +FollowSymLinks
AllowOverride All
# requires mod_version
<IfVersion >= 2.4>
Require all granted
</IfVersion>
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
</Directory>
# Useful logs for debug.
ErrorLog ${APACHE_LOG_DIR}/solderrepo_error.log
CustomLog ${APACHE_LOG_DIR}/solderrepo_access.log combined
</VirtualHost>
Rewrite Engine on Apache
If you don't have Rewrite Engine on your Apache web server, you need to use a URL with index.php after the domain name.
If you want a clean URL, install Rewrite Engine on your Apache web server and use the configuration provided above so your server uses the .htaccess file correctly and enable Rewrite Engine for your Solder, so you can access to your solder without index.php.