Appfog Free Hosting for Beginners.
Wall Script
Wall Script
Sunday, November 25, 2012

Appfog Free Hosting for Beginners.

AppFog is a cloud hosting platform and they are offering unlimited applications with in 2GB RAM usage. This is the best place to experiment your projects, specially for beginners. This post explains you how to setup an application and upload files into the AppFog hosting platform.

Appfog Free Hosting for Beginners

Live Demo

Just create an account at AppFog.com and then you will find out the following screens.

Step 1
Choose an application technology.
Appfog Free Hosting for Beginners

Step 2
You can choose a cloud platform.
Appfog Free Hosting for Beginners

Step 3
Choose a subdomain
Appfog Free Hosting for Beginners

Mission Control
Here you can control the application instance.
Appfog Free Hosting for Beginners

Services
Choose database service.
Appfog Free Hosting for Beginners

CName Configuration
Go to your domain registration website and choose DNS settings and add new CName record.
Appfog Free Hosting for Beginners

Domain Names
Appfog Free Hosting for Beginners

Ruby
Install rubyinstaller for Windows
Appfog Free Hosting for Beginners

Update Source Code
Start -> Ruby -> Start Command Prompt
// Install appfog
C:\>gem install af
// Create a sample folder
C:\>mkdir test
// Copy files into test directory.
C:\>cd test
// AppFog Login
C:\test>af login
Attempting login to [https://api.appfog.com]
Email: [email protected]
Password: *******
// Upload files into AppFog could.
C:\test>af update app_domain_name // Eg: 9lessonsdemos

dbconfig.php
Database configuration file for MySQL service.
$services_json = json_decode(getenv("VCAP_SERVICES"),true);
$mysql_config = $services_json["mysql-5.1"][0]["credentials"];
$username = $mysql_config["username"];
$password = $mysql_config["password"];
$hostname = $mysql_config["hostname"];
$port = $mysql_config["port"];
$db = $mysql_config["name"];
mysql_connect($hostname,$username,$password);

wp-config.php
If you want to setup Wordpress, just find and modify wp-config.php with below code.
$services_json = json_decode(getenv("VCAP_SERVICES"),true);
$mysql_config = $services_json["mysql-5.1"][0]["credentials"];
define('DB_NAME', $mysql_config['name']);
define('DB_USER', $mysql_config['user']);
define('DB_PASSWORD', $mysql_config['password']);
define('DB_HOST', $mysql_config['hostname']);
define('DB_PORT', $mysql_config['port']);
web notification

40 comments:

  1. hello, is this have a ftp access, or by command prompt only?

    ReplyDelete
  2. Great to know about new APPFog Free hosting tool.

    Srinivas Tamada, you are very good writer, but it is very long time to see you here.

    ReplyDelete
  3. Nice one. Could you please tell me how can I upload existing database dump?

    ReplyDelete
  4. Hi. Found this useful. Can you write how to use af command in Linux. It isn't working on Linux.

    ReplyDelete
  5. Thanks for sharing, works for me!!!

    ReplyDelete
  6. Error : <?xml version=”1.0” encoding=”u….

    i getting this error when i uploading php files can any one face the same problem .if any one with the solution please let me know .

    Srinivas please help me if have solution of it

    ReplyDelete
  7. Error : <?xml version=”1.0” encoding=”u….

    i am getting this error when uploading a php project . if any one getting the same problem and have a solution please help.

    Srinivas if u have any idea of the problem please share.

    ReplyDelete
  8. thanks for sharing does they support asp hosting as well?

    ReplyDelete
  9. its really awesome
    i tried wordpress its working
    thanks Srinivas for the info
    is this free for life

    ReplyDelete
  10. In dbconfig.php
    the username, password, hostname etc etc are given by Appfog or we can give our own information.

    ReplyDelete
  11. i think it will be useful when we have domain na

    ReplyDelete
  12. Ho to configure and update existing database of mysql in for using ruby application to Appfog.

    ReplyDelete
  13. This Information about Free Hosting is very useful for us. This is appreciated by my kind of new beginners. Thanks.

    ReplyDelete
  14. Finding a good web host is a task full of hazels. AppFog is really a good cloud hosting platform and the best thing about their service is they are offering unlimited applications with in 2GB RAM usage.

    ReplyDelete
  15. Please help.
    when i'm applying this step "C:\test>af login"
    i'm getting this message.
    C:\test>af login
    'af' is not recognized as an internal or external command,
    operable program or batch file.

    Note: Ruby192 was already install in my system.

    ReplyDelete
  16. Srinivas,
    Nice job. This was much more helpful than the quickstart at appfog.

    ReplyDelete
  17. need hosting website for java or jsp, will u pls say

    ReplyDelete
  18. It is good plataform to learn but don't like because AppFog Doesn't have a persistent file system. you can't upload images or files with your CMS

    ReplyDelete
  19. everytime i edited a file, i upload all project, how can i change that?

    ReplyDelete
  20. everytime i edited a file, i upload all project, how can i change that?

    is there anyone can help me?

    ReplyDelete
  21. How to add custom domain. It shows error while add custom domain.

    ReplyDelete
  22. I have purchased the theme from Name.com, how can I deal with it? can you please let me know

    ReplyDelete

mailxengine Youtueb channel
Make in India
X