jeff1evesque / LeQue

Activate installed microphone, and analyze sound input
13 stars 2 forks source link

Ubuntu Server 14.04 - Serve Web Applications #372

Closed jeff1evesque closed 10 years ago

jeff1evesque commented 10 years ago

We have properly setup this repository on the Ubuntu Server 14.04. The index.html corresponds the Apache2 Ubuntu Default Page:

terminal-listing

localhost

However, when visiting this project within a browser, we get a 404 Not Found:

404-not-found

jeff1evesque commented 10 years ago

First, clear the contents within each log file contained within the /var/log/apache2 directory, then save each emptied file.

Next, open http://localhost within the browser, and as above notice the page is being generated. So, we attempt to see if any logs were recorded:

$ cd /var/log/apache2
$ ls -l
total 4
-rw-r----- 1 root adm    0 Jul 30 00:29 access.log
-rw-r----- 1 root adm    0 Jul 30 00:27 error.log
-rw-r----- 1 root adm    0 Jul 27 09:34 other_vhosts_access.log

It is clear that no logs were recorded upon accessing the apache2 index.html. So, we proceed to access http://localhost/audio-analyzer/ within the browser, and notice one of the logs changed:

$ cd /var/log/apache2
$ ls -l
total 4
-rw-r----- 1 root adm    160 Jul 30 00:29 access.log
-rw-r----- 1 root adm        0 Jul 30 00:27 error.log
-rw-r----- 1 root adm        0 Jul 27 09:34 other_vhosts_access.log

We open access.log:

$ cd /var/log/apache2
$ sudo pico access.log

And, notice the following content:

::1 - - [30/Jul/2014:00:30:09 -0400] "GET /audio-analyzer/ HTTP/1.1" 404 503 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0"

Now, we attempt to access http://localhost/audio-analyzer/index.php within the browser. Again, only the access.log file changes:

$ cd /var/log/apache2
$ ls -l
total 4
-rw-r----- 1 root adm    329 Jul 30 00:29 access.log
-rw-r----- 1 root adm        0 Jul 30 00:27 error.log
-rw-r----- 1 root adm        0 Jul 27 09:34 other_vhosts_access.log

We open access.log file, and notice the following content:

::1 - - [30/Jul/2014:00:30:09 -0400] "GET /audio-analyzer/ HTTP/1.1" 404 503 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0" ::1 - - [30/Jul/2014:00:39:27 -0400] "GET /audio-analyzer/index.php HTTP/1.1" 404 512 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0"

IRC #ubuntu (07/29/14 ~ 9:45pm EST):

jeffreylevesque: I need to configure my Ubuntu Server. It currently doesn't serve up pages from my web application - https:/​/​github.com/​jeff1evesque/​audio-analyzer/​issues/​372

meganerd: jeffreylevesque: /var/log/apache2/error.log

jeff1evesque commented 10 years ago

We discovered that applications should be saved within the html/ subdirectory. Ubuntu Server 14.04 defines this as the new root directory for the server. After moving the audio-analyzer directory into the html/ subdirectory, the page was generated within the browser:

audio-analyzer