[RESOLVED] Hosting an HTML webpage on the Yun

Hello all, and regards,

I am attempting to build a system in which a webpage is hosted by the linino side of the Yun, and is accessible from any browser on the local network, and/or with a password. I have built a website which can communicate with the Yunserver through REST, does anyone know how exactly to host that website on the Linino side of the Yun? Previously I have opened my HTML doc from my local computer. Is there any way to maintain that the website is only accessible from the local network?

I can ssh into the linino through putty, and am building my website from scratch, learning as I go.

Apologies if the way I'm saying this is wrong or confusing, I will be checking often for responses.
Also I am new to the tech world, and the Arduino Yun is really cool but also daunting.
Forgive me if I have no idea what I'm talking about.

Thank you all in advance!

Kiobod

EDIT: for anyone else interested, there's a really great resource available at: http://scuola.arduino.cc/courses/lessons/view/b4EoRkV

I understand how the process works now. My next hurdle is getting past an 'access denied' that occurs both when I attempt to SSH, and when I upload via the Arduino IDE. There has been a discussion about this issue before in the forums, at
http://forum.arduino.cc/index.php?topic=194460.0

However, my terminal does not recognize the ln -s command, thus I am still working with the issue.
Any further input appreciated, all past input was extremely helpful, I am much obliged.

Kiobod

EDIT 2: My webpage is now up and running, and accessible from any computer on my network - thanks again to everyone who helped.

The problem was that the files /mnt/sda1/arduino and /mnt/sda1/arduino/www were not created - I had assumed there were created with the update. The other issue is that previous users had fixed the problem by using ln -s /mnt/sda1/www/sd. I don't know how they resolved it this way, it didn't resolve my issue.

What fixed my problem and allowed my Yun to host a webpage, was the creation of the /arduino and /arduino/www files in the sd card, by using ln -s /mnt/sda1/arduino/www from my SSH terminal.

Unfortunately, now my javascript REST commands are broken, and the arduino keeps asking me for credentials in order to do things. I don't know why that's happening, but I'm sure I can figure it out eventually with help from other threads.

Please send me a message, or post to this thread if there's anything I might be able to help you with!

FINAL EDIT:
The above turned out to only be a temporary fix to the problem. To ensure that my sd card held the new os, it turned out to be much easier simply to use the usb port for alternative storage, and to create the /arduino/www files there.
Also beware, once you write a document to the www, you cannot overwrite the file of the same name. In order to update that file you must manually delete it, and then re-write your updated file.

There are various examples that you can find which will help you on your way.
Basically, webpages will be accessed from the micro sd card. Format one, then preferably do an update, using the processes described in the reference pages etc.
The card requires a folder called 'arduino', within which resides a 'www' folder. These must be created. The arduino folder contains the sketch, the www folder contains all files pertaining to the site. HTML, js, css etc.

You can either write directly onto the card, or use the development program to transfer these files. The work folder on the PC must contain a www subdirectory with all the relevant files in. Uploading via wifi will transfer all the files to the card.
Access your site with ip add+ / sd /www/.

As an example, take a look at TemperatureWebPanel example
Playground has some info about installing things like php Arduino Playground - Yun
This forum has a lot of web based projects, some python others php based

Thanks!

I'll have to learn what PHP is, but thank you both for pointing me in the right direction! Lots of great learning experiences so far, looking forward to getting comfortable with the linino!

Kiobod

Also - thanks for all the great work Federico :slight_smile:

Don't forget to upgrade if you haven't yet! (see my signature)

I hadn't upgraded yet! So now I have, thanks for the reminder.
However, I am still having issues with permission and access.
ln -s etc hasn't solved the problem - anyone else have the same issue?

All the best.
Kiobod

EDIT:
Other people have had this issue.
Things I've looked at:
http://forum.arduino.cc/index.php?topic=218640.msg1596383#msg1596383
http://forum.arduino.cc/index.php?topic=189822.0
http://forum.arduino.cc/index.php?topic=187386.0

EXTRA (CR)EDIT:
@Roffey - when you say create the file, do you mean on the sd card itself? As in create a folder within a folder & drag n drop into the card? If so, It won't let me write to the card that way, now that I've updated the linino. Thoughts? Could this have something to do with my lack of permission? Should I start over and re-install the update with the folder already on there? Is there some way to create a file directory through SSH? Is there a way I can get around my lack of permission? Thanks again for any and all input.