jeudi 29 janvier 2015

AppWeb server with MVC on Ubuntu not working as expected

Disclaimer: I'm a linux noob


That being stated, after following the instructions on how to install AppWeb on Ubuntu (http://ift.tt/1CQAQrI) I did the following:



  1. Changed directory to where I installed AppWeb :

    [my_username@ubuntu]:$ cd ~/apps/appweb

  2. Changed directory to one of the samples provided by the isntallation (MVC related)

    [my_username@ubuntu]:~/apps/appweb$ cd samples/esp-hosted

  3. Started AppWeb at that location:

    [my_username@ubuntu]:~/apps/appweb/samples/esp-hosted$ appweb

    This gave me the following info:

    01/29/15 12:41:47 2 appweb, Configuration for Embedthis Appweb

    01/29/15 12:41:47 2 appweb, ----------------------------------

    01/29/15 12:41:47 2 appweb, Version: 5.3.0

    01/29/15 12:41:47 2 appweb, BuildType: Debug

    01/29/15 12:41:47 2 appweb, CPU: x86

    01/29/15 12:41:47 2 appweb, OS: linux

    01/29/15 12:41:47 2 appweb, Host: ubuntu

    01/29/15 12:41:47 2 appweb, Configure: me -d -q -platform linux-x86-default -configure . -with openssl -gen make

    01/29/15 12:41:47 2 appweb, ----------------------------------

    01/29/15 12:41:47 0 info http, Started HTTP service on *:4000

  4. I then went to firefox and typed "http://localhost:4000" in the address bar

    This showed me a static page with static info asexpected


The problem I'm having is that this sample is touted to display a basic blog with which one can interact. Well, the blog is not available because whenever a blog related web address (MVC pattern) is entered, the server responds with a "file not found" response. The appweb.config file provided by the sample is described below:



#
# appweb.conf -- Appweb configuration for ${UAPP} (esp-html-mvc)
#

ErrorLog stdout level=2 append

Listen 4000

LoadModule espHandler libmod_esp

#
# SSL/TLS configuration
#
# LoadModule sslModule libmod_ssl
# ListenSecure 443
#
# SECURITY NOTE: you must generate the server.crt and server.key.pem.
# Use a decrypted key here so it won't prompt for the password.
#
# SSLCertificateFile "server.crt"
# SSLCertificateKeyFile "server.key.pem"

#
# Define the application
<EspApp name="blog" routes="esp-html-mvc">
#
# EspResource NAME
# EspResourceGroup
#
# <Route /upload-uri>
# AddInputFilter uploadFilter
# UploadDir /tmp
# UploadAutoDelete on
# LimitUpload 200MB
# </Route>
</EspApp>

# LogRoutes


So, If I were to type http://localhost:4000/post/list (local to my computer), then I should expect a page like the one at the following link (http://ift.tt/1CQAQrK) under the "Scaffolds" section, but instead I get the "Access Error: 404 -- Not Found" message from the server


I know my way around the MVC paradigm so I think I'm doing this correctly (since I followed the instructions), but it's possible I may have missed a step, but I just can't see it because of my linux noobiness.


Any suggestions?





Aucun commentaire:

Enregistrer un commentaire