Skip to content
This repository has been archived by the owner on May 23, 2021. It is now read-only.
Alexandre Cavalheiro S. Tiago Da Silva edited this page Jan 22, 2021 · 1 revision

MyAAC is an account manager for Tibia 7.x-11.x (12.x in dev branch) which is also used as entry point for Tibia 11.x and above.

Windows

This wiki page will not cover how to set-up in a Windows machine but you can set up a WSL and follow the Linux tutorial.

Another option is to read this wiki page from the people at OTServBrasil, however, that is in Portuguese and recommends using XAMPP which we strongly advise against.

Linux

Dependencies

Setting-up files

It is recommended to follow these steps using the root user since you will not be able to cd (change directory) in some instances using your user. If you don't know how to change to root, you can do so with: sudo su - root.

After that you want to enter the /var/www directory, which is where we will put the website files.

You can go to the MyAAC/releases and get the latest stable version there, whose file extension will end in .tar.gz (tarball with Gzip compression) and extract in the same directory using tar -xf <file name>. From there you want to give ownership of the directory and it's files using the change owner command: chown -R nginx:nginx <directory>. You can then enter the directory and here we are going to mess with file permissions.

Configuring PHP-FPM

You need to edit the default configuration created by PHP-FPM to change the owner of the processes created by it from apache to nginx. To do that, you are able to nano /etc/php-fpm.d/www.conf.

The properties you need to change are:

  • user
  • group
  • listen.acl_users

All of them have the value of apache and you want to change it to nginx, otherwise nginx will not have the correct access.

Configuring nginx

Now to configure nginx which is our proxy server which will serve our website through HTTP.

You will need to create a virtual server in nginx by creating a new configuration file in /etc/nginx/conf.d. To do so you can run nano /etc/nginx/conf.d/myaac.conf.

Here is an example of how your configuration should look like:

server {
	listen 80;
	listen [::]:80;

	# set max upload size
	fastcgi_buffers 64 4K;

	# Remove X-Powered-By, which is an information leak
	fastcgi_hide_header X-Powered-By;

	root /var/www/myaac;
	index index.php /index.php$request_uri;

	# Default Cache-Control policy
	expires 1m;

	location = /robots.txt {
		allow all;
		log_not_found off;
		access_log off;
	}

	location ~ \.php(?:$|/) {
		fastcgi_split_path_info ^(.+?\.php)(/.*)$;
		set $path_info $fastcgi_path_info;

		try_files $fastcgi_script_name =404;

		include fastcgi_params;
		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
		fastcgi_param PATH_INFO $path_info;

		fastcgi_param modHeadersAvailable true;         # Avoid sending the security headers twice
		fastcgi_param front_controller_active true;     # Enable pretty urls
		fastcgi_pass php-fpm;

		fastcgi_intercept_errors on;
		fastcgi_request_buffering off;
	}

	location ~ /\.ht {
		deny all;
	}

	location /system {
		deny all;
		return 404;
	}

	location / {
		try_files $uri $uri/ /index.php$request_uri;
	}
}

Installing

Now that you have finished all those steps, all that is left is to start all processes and go through the installation steps of the account manager.

You want to start php-fpm and nginx (assuming mariadb/mysqld are already running), which you can do so by doing systemctl start php-fpm nginx.

Followed by that you can open your browser and go to localhost and follow the installation steps. In the configuration step it will ask what client version you have, there you can just set to the highest.

Configuring

Now you need to install a plugin in your account manager to be able to successfully connect using your client, for that, you can go in this plugin page and download the .zip file. Inside the admin panel localhost/admin you can go in the plugins section and upload that ZIP file. With that, you should be done!

F.A.Q.

How can I have the same layout as you do?

R: In our website we use a custom version of the tibiacom template, which you can find here: Hydractify/lego.