This repository contains the source code of the SFML website.
The main goal here is to provide a place to easily report or even fix issues with the website. For longer discussions however one should still use the dedicated sub-forum on the SFML forum.
The website is mostly HTML with a bit of PHP sprinkled on top, and styled using LESS.
To view the website in your browser for development, you can essentially pick any web server, that can call PHP.
It's highly recommended to use WSL2, as setting up Apache or Nginx is a lot more straight forward on a Linux subsystem.
If you don't want to do this, there are common packages such as XAMPP, WampServer, or AMPPS.
After WSL2 has been installed and you opened an Linux shell in the Windows Terminal, follow the Linux steps below.
Ensure brew
is installed.
brew install php
brew install nginx
# OR
brew install httpd
Additional References:
On Linux, we'll provide commands for Debian/Ubuntu-like package managers. If you use a different distro, you'll have to look up the equivalent commands.
sudo apt install php8.1-fpm
sudo apt install nginx
# OR
sudo apt install apache2
In case php8.1-fpm
doesn't exist, add the PPA:
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
General Notes:
80
is already in use, change the port to something else. If you for example pick 1337
, the website will then be accessible at http://sfml.localhost:1337
*.localhost
DNS are automatically mapped to 127.0.0.1
. If you want to use another custom domain, make sure to put a resolving DNS entry in your hosts
file./mnt/c/...
to access the C:\
drive./etc/nginx/sites-available
sites-enabled
directory, to enable the new config: sudo ln -s /etc/nginx/sites-available/sfml /etc/nginx/sites-enabled/sfml
sudo /sbin/nginx -t
sudo service nginx reload
or sudo systemctl reload nginx
brew services start nginx
brew services start php
/usr/local/etc/nginx/nginx.conf
or /opt/homebrew/etc/nginx/nginx.conf
nginx -t
brew services reload nginx
server {
listen 80;
listen [::]:80;
server_name sfml.localhost;
root /path/to/the/cloned/SFML-website/repository;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~* \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# Uncomment for Linux
#fastcgi_pass unix:/run/php/php8.1-fpm.sock;
# Uncomment for macOS
#fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
/etc/apache2/sites-available
sites-enabled
directory, to enable the new config: sudo ln -s /etc/apache2/sites-available/sfml /etc/apache2/sites-enabled/sfml
sudo /sbin/apache2 -t
sudo service apache2 reload
or sudo systemctl reload apache2
/usr/local/etc/httpd/httpd.conf
or /opt/homebrew/etc/httpd/httpd.conf
brew services reload httpd
<VirtualHost *:80>
ServerName sfml.localhost
DocumentRoot /path/to/the/cloned/SFML-website/repository
DirectoryIndex index.php index.html
</VirtualHost>
See the LICENSE file.