Web Server Manual

webserver
virtualhosts
v7

(Paul Farrar) #1

Nethserver 7.4

is there a nice step by step guide to setting up the Nethserver Web server with a website that you can open internally?

What software packages do you need to install to make it work? Not the HTML just the functions to get a simple test page to display when you search for the correct address in your browser.

I want to run an internal website for my home where I can display information like weather, the temperature in the house, the output from my Solar Panels, energy consumption, have a page for the hundreds of recipes my wife has collected so she can access them in the kitchen etc etc.

Is there a database that is recommended for use in Nethserver and I could use with the website to display data.

I may want to allow access from outside eventually, I have a DDNS address with NoIP and currently, the Nethserver is called nethserver.xxx.ddns.net


(Rob Bosch) #2

If you want to have a website that shows all that info, you have to build it. You might want to have a look at a CMS like Wordpress. Be aware that Wordpress may need a newer version of php (so you have to install nethserver-php-scl and it will need nethserver-mysql.
I think in these forums or in the wiki you can find more about installing wordpress on nethserver.

You can also have a look at installing Xibo. However this is signage software and streams the webpages over your LAN, it is highly configurable and it can show all the things you want, including weather updates and recipes.


(Markus Neuberger) #3

You may use nethserver-ddclient for DDNS:

https://wiki.nethserver.org/doku.php?id=module:ddclient


(Marc) #4

The httpd (apache) server is installed by default. Other packages that could come in handy are the Web Server module (which includes nethserver-virtualhosts) and MariaDB module (mysql-like database).

Make sure to check the assigned access to httpd service (Security -> Network Services). By default it’s accessible from private and public networks.

To test a custom webpage at the default location you can drop an index.html or index.php file in /var/www/html/. It will be accessible from the server FQDN. You can also create sub-directories.

A common php function is phpinfo

If you need custom domains you can make use of virtual hosts (Web Server module).
Files would be located under /var/lib/nethserver/vhost/

Bear in mind that for external access you might need a registered domain name (or DDNS) and proper A records pointing to your server.

To add up to other suggestions, Community modules are worth a look. The same with Nextcloud and its apps (like sensor logger).

Related Manuals


(Paul Farrar) #5

I know there is an amount of work to do this, but my first step is to get a webpage that I can access from any device on my LAN. So a basic method to access an area from a browser that is hosted on my Nethserver is step-one and then add security access to it.

After that, I want to be able to access that from outside my LAN.

Once I have all that I can start to construct some simple pages for use as placeholders while I start to code, steal, plagiarise, copy or just link to some of the features I want to add.


(Paul Farrar) #6

Thanks dnutan

That will get me the basics - a test web page that I can get internally and externally.

That was my step one goal.

Simple small steps made many times…


(Paul Farrar) #7

Thanks, Markus, question: My ISP has an entry for NoIP ddns and it does pick up my IP, so I do not need to run the client on Nethserver - correct? or do I still need the client on the server


(Markus Neuberger) #8

No, you don’t need a DDNS client on NethServer in this case.


(Michael Träumner) #9

You can also install a content-management system like wordpress

or joomla

The tutorials are written for Nethserver 6, but it should work almost equal.
If there are problems, please ask here.