Hosting Web Pages

Hosting Web Pages

Postby rimoth » Thu Nov 07, 2013 11:25 am

Is it possible to host my own webpages with the fvdw firmware? Or would I need to install another webserver on another port?

If it is possible what webserver does the fvdw firmware use? Is it Apache and is there any support for server side java or php?

Reason for asking is that I would like to host a webpage for intranet/home use which would also query the Logitech Media Server database which is also installed on my NAS (cloudbox and network space 2)
rimoth
Donator VIP
Donator VIP
 
Posts: 61
Joined: Mon Jul 08, 2013 9:33 am

Re: Hosting Web Pages

Postby Jocko » Thu Nov 07, 2013 1:22 pm

Hi rimoth,

Yes, you can do it :-D and the webserver is apache 2.4.3.

There are several ways to do it :

The simplest :
- save your own pages in a share (I assume that you create a subfolder 'myweb' in fvdw)
- create a symlink in /usr/htdocs
Code: Select all
ln -s /share/1000/fvdw/myweb /usr/htdocs/myweb

and the relevant URL would be http://mynasmane/myweb/yourdefaultpage.html or http://mynasmane/myweb if your default page is home.php
if you want other credential settings you must add a custom .htaccess file in your folder myweb

At each firmware upgrade you should restore the symlink

Other solution create a virtual host:
- save your own pages in a share (I assume that you create a subfolder 'myweb' in fvdw)
- create a custom configuration file myweb.conf (I assume in the share fvdw)
- edit the conf file:
Code: Select all
Listen yourport
<VirtualHost *:yourport>
   # Directory Listing prevent
   Options -Indexes +FollowSymLinks (or other options...be careful with version 2.4.3 you must always use - or + to list the selected options)

   # Documentroot
   DocumentRoot "/share/1000/fvdw/myweb"

   DirectoryIndex yourdefaultpage

</VirtualHost>

- add in each http.x files of the folder /etc this line :
Code: Select all
#My own host
Include /share/1000/fvdw/myweb.conf

To update the webserver with your conf file, you should restart the web server and the url would be http://mynasme:yourport

Of course you can add more directives for your own host : for example AuthType, AuthName, AuthUserFile, Require if you want to handle a credential
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Hosting Web Pages

Postby rimoth » Thu Nov 07, 2013 2:16 pm

Hi Jocko,

Thanks for the speedy reply. I'll give the easy method a go and create a symlink to a share.

I guess that since you mention home.php that php is available. Do you know if java is available too (not sure if I'll need it yet).

Thanks.
rimoth
Donator VIP
Donator VIP
 
Posts: 61
Joined: Mon Jul 08, 2013 9:33 am

Re: Hosting Web Pages

Postby Jocko » Fri Nov 08, 2013 9:17 am

Hi rimoth,

Indeed, you can use php to operate on server side.
But currently no J2E is available with the firmware. Do you want to build an application ?
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Hosting Web Pages

Postby rimoth » Fri Nov 08, 2013 1:23 pm

Yes I want to build an application if I can find the time!

Basically want to build a remote control app for the logitech media server and also pull in some music stats information from last.fm.

Thinking of using angjular.js for the web front end and use php to communicate to the sqllite database which the media server uses as its store - so probably no need for server side java.
rimoth
Donator VIP
Donator VIP
 
Posts: 61
Joined: Mon Jul 08, 2013 9:33 am


Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron