📜 ⬆️ ⬇️

Configure Synology Server: Web Server

Greetings habrachiteli!

In today's post, I want to share the experience of setting up the Synology web server on DiskStationManager (DSM) v3.2-1955.

This instruction, in my opinion, is suitable for any model of Synology NAS-server with all the differences only in hardware. The software part is spinning on the DSM, which is regularly updated.
')
Introduction

I recently purchased a SynologyDS 712+ NAS server.
image
The motivation for writing the post was a series of obscure problems for me when raising the web server. I want to systematize the knowledge and experience gained in this post.

Start

It all started with the fact that after setting up the server, according to the manual enclosed on the CD, I couldn’t pick up the virtual hosts and, as a result, achieve the performance of several sites on one server that I needed.

Install phpMyAdmin

If you plan to “tie up” your websites to the database (DB), I recommend immediately installing phpMyAdmin (PMA) for the convenience of working with the database (I don’t need a database yet because of the specificity of the task I need):
Start and configure the web server
Website launch
FTP access
Subtleties that are worth paying attention to
  1. The most important thing is that you don’t need to create “www” subfolders in folders with sites that will have our index.php, as it is written in the manual to the server! Those. in / web / abandongames / www / - the “www” folder is not needed!
  2. The shared folder “web” may also contain index.htm, index.html or index.php, in this case the “www” subfolder is also not required;
  3. To generate your error pages, you need to put the missing.html, missing.htm or missing.php files in the root of the “web” public folder. Most likely, this rule is also applicable to subfolders with sites, i.e. /web/abandongames/missing.php;
  4. It is forbidden to create in the shared folder “web” subfolders “blog”, “photo”, “photosrc”, “webdefault”;
Some recommendations
  1. Close port 5000, if you don’t manage the server remotely, and if you’re managing it, register in the settings of the router only the allowed IPs from which you plan to log into DSM;
  2. When installing PMA, you need to change the root access password and, if necessary, create new database users (in PMA) with their own rights;
  3. When manipulating site files, you need to work in binary mode (FTP);
  4. If something on the site does not work (some functionality not dependent on curved hands), you first need to check the permissions on the site file / folder in FTP mode and set the corresponding permissions;
  5. Forward ports on the router

    image

    In this case, my FTP 20 port is forwarded to one server, port 21 to another, so do not be surprised.
I hope with my post I will facilitate the elevation of the home web server of Synology.

Thank you for attention.

PS I am waiting for constructive criticism and updates to the post.

Source: https://habr.com/ru/post/135719/


All Articles