sudo apt update && sudo apt upgrade -y &&
sudo apt install nginx php-fpm mariadb-server -y &&
sudo apt install phpmyadmin -y &&
sudo apt-get install git cmake build-essential liblua5.2-dev libgmp3-dev libmysqlclient-dev libboost-system-dev libboost-iostreams-dev libboost-filesystem-dev libpugixml-dev libcrypto++-dev libfmt-dev libboost-date-time-dev
#after setting up the nginx etc :
sudo chown -R www-data:www-data /var/www/html/engine/cache/ &&
sudo chmod -R 775 /var/www/html/engine/cache/
nano /etc/nginx/sites-available/default
server {
listen 80 default_server;
listen [::]:80 default_server;
root /home/html;
# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;
server_name _;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
# pass PHP scripts to FastCGI server
#
location ~ \.php$ {
include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
################## UBUNTU 18.04 LTS ##################
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
################## UBUNTU 20.04 LTS ##################
# fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
}
nano /etc/nginx/sites-available/phpmyadmin
server {
listen 2344;
server_name _;
root /usr/share/phpmyadmin;
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
client_max_body_size 256M;
error_page 404 @notfound;
location / {
index index.html index.php;
try_files $uri $uri/ /index.php?$args;
}
location ~* \.(gif|jpg|jpeg|png|bmp|js|css)$ {
expires max;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
################## UBUNTU 18.04 LTS ##################
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
################## UBUNTU 20.04 LTS ##################
# fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
location @notfound {
return 404 "You're not browsing correctly.";
add_header Content-Type text/plain always;
}
}
sudo ln -s /etc/nginx/sites-available/phpmyadmin /etc/nginx/sites-enabled/phpmyadmin
sudo systemctl restart nginx
# Source:
# https://www.cloudflare.com/ips
# https://support.cloudflare.com/hc/en-us/articles/200169166-How-do-I-whitelist-CloudFlare-s-IP-addresses-in-iptables-
for i in `curl https://www.cloudflare.com/ips-v4`; do iptables -I INPUT -p tcp -m multiport --dports http,https -s $i -j ACCEPT; done
for i in `curl https://www.cloudflare.com/ips-v6`; do ip6tables -I INPUT -p tcp -m multiport --dports http,https -s $i -j ACCEPT; done
# Avoid racking up billing/attacks
# WARNING: If you get attacked and CloudFlare drops you, your site(s) will be unreachable.
iptables -A INPUT -p tcp -m multiport --dports http,https -j DROP
ip6tables -A INPUT -p tcp -m multiport --dports http,https -j DROP
I downloaded second option but I have errors while compiling source and error 500 when I uploaded myaac filesMyAAC - you can use newest version:
![]()
GitHub - slawkens/myaac: Automatic Account Creator (AAC) for Open Tibia Servers written in PHP
Automatic Account Creator (AAC) for Open Tibia Servers written in PHP - slawkens/myaacgithub.com
TFS with 8.6 protocol:
1. You can download TFS 0.4 from 8.6 times:
and fix compilation errors using:![]()
GitHub - otland/tfs-old-svn at curated/r3884
TFS repository once kept private, converted from SVN - GitHub - otland/tfs-old-svn at curated/r3884github.com
There are many threads with compilation errors, but I did not find any with full instruction how to fix all problems.
For people familiar with 'git compare':
1) All errors fixed one by one: gesior/tfs_0.4_on_debian_10 (https://github.com/gesior/tfs_0.4_on_debian_10/commits/main)
2) Total diff of TFS 0.4 rev 3777 update to compile it on Debian 10: gesior/tfs_0.4_on_debian_10 (https://github.com/gesior/tfs_0.4_on_debian_10/compare/c215d09...9664f12)
TFS 0.4 rev 3777 sources updated to compile on Debian 10: gesior/tfs_0.4_on_debian_10...
- Gesior.pl
- Replies: 71
- Forum: Miscellaneous
2. You can download TFS 1.3+ (10.98) downgraded to 8.6 protocol:
![]()
GitHub - gesior/MillhioreBT-forgottenserver-downgrade at windows_compilation
TFS Downgrade 1.5+ is an engine based on nekiro downgrade but highly updated with current tfs code, it also has the lua modules divided and uses lua5.4 - GitHub - gesior/MillhioreBT-forgottenserver...github.com
Problem with option no 1 is that you will have to fix C++ compilation errors.
Problem with option no 2 is that some things (spells, monsters etc.) may work different than on 8.6 (as it's 10.98 with downgrade and it wasn't finished by author).
I tried Ubuntu 22.04 withI downloaded second option but I have errors while compiling source
docker
and got some errors about lua_*
, when I've installed libluajit-5.1-dev
(LuaJIT).apt remove --purge libluajit-5.1-dev
and then install all required packages:apt update && apt install -yq cmake build-essential ninja-build libcrypto++-dev libfmt-dev liblua5.4-dev libmysqlclient-dev libboost-iostreams-dev libboost-locale-dev libboost-system-dev libpugixml-dev
cmake --preset default && cmake --build --config RelWithDebInfo --preset default
docker
:FROM ubuntu:22.04
RUN apt update && \
apt install -yq cmake build-essential ninja-build \
libcrypto++-dev libfmt-dev liblua5.4-dev libluajit-5.1-dev libmysqlclient-dev \
libboost-iostreams-dev libboost-locale-dev libboost-system-dev libpugixml-dev
COPY cmake /usr/src/forgottenserver/cmake/
COPY src /usr/src/forgottenserver/src/
COPY CMakeLists.txt CMakePresets.json /usr/src/forgottenserver/
WORKDIR /usr/src/forgottenserver
RUN cmake --preset default && cmake --build --config RelWithDebInfo --preset default
I formatted Ubuntu 22 to its default state, followed your instructions, but later it stopped reading PHP code. The page displayed raw PHP code instead. After installing PHP, a 500 error occurs on the website. If I test it with a page using the IP /test.php containing <?php echo 'Current PHP version: ' . phpversion(); ?>, it shows version 8.1 and PHP code execution works. However, when I upload the source code of MyAAC, Gesior, or Znote to the /var/www/html folder, I keep getting a 500 error.ill leave this here:
this is all the needed stuff for setting up the server
for ubuntu.v22
Bash:sudo apt update && sudo apt upgrade -y && sudo apt install nginx php-fpm mariadb-server -y && sudo apt install phpmyadmin -y && sudo apt-get install git cmake build-essential liblua5.2-dev libgmp3-dev libmysqlclient-dev libboost-system-dev libboost-iostreams-dev libboost-filesystem-dev libpugixml-dev libcrypto++-dev libfmt-dev libboost-date-time-dev #after setting up the nginx etc : sudo chown -R www-data:www-data /var/www/html/engine/cache/ && sudo chmod -R 775 /var/www/html/engine/cache/
here is the web stuff or how it should look:
Bash:nano /etc/nginx/sites-available/default server { listen 80 default_server; listen [::]:80 default_server; root /home/html; # Add index.php to the list if you are using PHP index index.php index.html index.htm index.nginx-debian.html; server_name _; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; } # pass PHP scripts to FastCGI server # location ~ \.php$ { include snippets/fastcgi-php.conf; # # # With php-fpm (or other unix sockets): ################## UBUNTU 18.04 LTS ################## fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; ################## UBUNTU 20.04 LTS ################## # fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; } } nano /etc/nginx/sites-available/phpmyadmin server { listen 2344; server_name _; root /usr/share/phpmyadmin; add_header X-Frame-Options DENY; add_header X-Content-Type-Options nosniff; add_header X-XSS-Protection "1; mode=block"; client_max_body_size 256M; error_page 404 @notfound; location / { index index.html index.php; try_files $uri $uri/ /index.php?$args; } location ~* \.(gif|jpg|jpeg|png|bmp|js|css)$ { expires max; } location ~ \.php$ { include snippets/fastcgi-php.conf; ################## UBUNTU 18.04 LTS ################## fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; ################## UBUNTU 20.04 LTS ################## # fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; } location @notfound { return 404 "You're not browsing correctly."; add_header Content-Type text/plain always; } } sudo ln -s /etc/nginx/sites-available/phpmyadmin /etc/nginx/sites-enabled/phpmyadmin sudo systemctl restart nginx
here is cloudflare stuff:
Bash:# Source: # https://www.cloudflare.com/ips # https://support.cloudflare.com/hc/en-us/articles/200169166-How-do-I-whitelist-CloudFlare-s-IP-addresses-in-iptables- for i in `curl https://www.cloudflare.com/ips-v4`; do iptables -I INPUT -p tcp -m multiport --dports http,https -s $i -j ACCEPT; done for i in `curl https://www.cloudflare.com/ips-v6`; do ip6tables -I INPUT -p tcp -m multiport --dports http,https -s $i -j ACCEPT; done # Avoid racking up billing/attacks # WARNING: If you get attacked and CloudFlare drops you, your site(s) will be unreachable. iptables -A INPUT -p tcp -m multiport --dports http,https -j DROP ip6tables -A INPUT -p tcp -m multiport --dports http,https -j DROP