Nas Apache Web Server

Posted on  by admin
Home

This post will describe how I configured this FreeNAS box to store web files and serve as a document root for the Apache http server implemented in my Ubuntu server. This approach places my local web files on a solid, reliable and centralized RAID 5 disk storage system, and provides good logical and physical separation between file storage.

  1. A practical guide to secure and harden Apache HTTP Server. The Web Server is a crucial part of web-based applications. Apache Web Server is often placed at the edge of the network hence it becomes one of the most vulnerable services to attack.
  2. The Apache HTTP Server ('httpd') was launched in 1995 and it has been the most popular web server on the Internet since April 1996. It has celebrated its 25th birthday as a project in February 2020. The Apache HTTP Server is a project of The Apache Software Foundation. Apache httpd 2.4.46 Released 2020-08-07 ΒΆ.
  3. Planning to add a Raid1 NAS to our home business development network. We have a web server (MAC1) serving the local network with files from its local hard drive. I want to move those files from its local drive to the NAS and serve web pages which then reside on the NAS.

[Answer ID: 14727]

Created 09/26/2012 13:10 Updated 04/24/2014 08:27

LinkStation can be setup as a web server to publish web contents.

The Web hosting feature is implemented by a dedicated Apache web server, MySQL Data Base server and PHP support.

Nas

Follow this procedure to enable Web server and MySQL feature on the LinkStation.

Nas File Server

Enable Web Server
1.

Create a shared folder to store configuration and web contents. Enable access restriction and assign a (admin) user to access the folder.

A.In LinkStation's settings, navigate to [Shared Folder] - [Folder Setup] and click [Create Folder].
B.Click 'Access Restriction' check box and click to add user.
2.

Navigate to [Network] - [Web Server], then click [Modify Settings].

A.Enable Web Server function.
B.Set Port number (default 81).
C.Select Target Path (same directory from step 1). The drop down may take a minute to update the list.
D.Save the settings.
3.

You may skip this step. Optional, modify php.ini: as needed and save.

Enable MySQL server:
4.

Enable MySQL server: Navigate to [Network] - [MySQL server].

A.Click [Modify Settings].
B.Enable MySQL server.
C.Select a folder for MySQL database and configuration. You may select the same folder as in step 1.
D.Click [Save].

Nas Vs Server

Nas apache web server login

Note:
MySQL web console is available from 'phpmyadmin' button.

htdocsindex.php

Subfolder htdocs in specified folder (from step 1) is where the Web server looks for the published web pages.

Modify index.php or replace it with index.html to test the setup.

Nas server software
Web Server access

The URL to Web server is IP_address:Port_Number.

Qnap Nas Web Server

From the LAN (intranet), to access the web server simply enter the IP address of the NAS device and the port number (for example http://x.x.x.x:81).

Web

If you are planning to access the device from internet, setup static IP address for the NAS device and on your router, setup DDNS & NAT table to forward http port 80 on WAN port to port X (81) on LAN.

To test your setup see sub folder htdocs. Copy a web page to this directory and try to access it from a browser.

The Web server port is not the default port 80. To access the web page on the server enter IP:PORT in browser; (for example: http://192.168.20.32:81)

MySQL Server access

Navigate to Services and click MySQL Server configuration button.

MySQL web console is available from [phpmyadmin] button. Log in to phpmyadmin using Web UI administrator's username and password (admin/password).

To remotely access MySQL server using any 3rd party client GUI such as MySQL Work Bench

in phpmyadmin SQL web console type:

GRANT ALL ON *.* to admin@'192.168.20.32' IDENTIFIED BY 'password';

or for any IP in same subnet address:

GRANT ALL ON *.* to admin@'192.168.20.%' IDENTIFIED BY 'password';

replace admin, password and IP with username, password and LinkStation's IP address. The % character is pattern replacement for any IP in same subnet address.

For more information, see simple login setup with php and MySQL on the NAS Web Server here.


Details


Products

Nas Apache Web Server Download

OS / Hardware

Please tell us how we can make this answer more useful.

Nas Apache Web Server Hosting