Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4347712
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T12:20:38+00:00 2026-05-21T12:20:38+00:00

I have a linux box (Ubuntu 10.10 server edition) in ec2. I have written

  • 0

I have a linux box (Ubuntu 10.10 server edition) in ec2. I have written a web service using cherrypy framework. Let’s say this is the code that I have written.

import sys
sys.path.insert(0,'cherrypy.zip')
import cherrypy
from cherrypy import expose

class Service:

    @expose
    def index(self):
        return 'Hello World'

cherrypy.quickstart(Service())

I have copied this file, the cherrypy.zip file to /var/www in my ec2 instance. [I should inform that I created the www directory manually, as it wasn’t there]. Then I ran

python webservice.py

and got the message

[01/Apr/2011:13:50:04] ENGINE Bus STARTED

However, when I try to run

(I have masked my public ip)
ec2-1**-2**-1**-**.ap-southeast-1.compute.amazonaws.com/

in my browser, I get connection failed. Can anyone tell me where I have gone wrong? or what I should do?

EDIT:
Okay, here is something interesting that I found. When I do

python webservice.py

I see

ENGINE Serving on 127.0.0.1:8080

Which means, the webservice will run only for the local machine. How do I make set the service 0.0.0.0 (that is, to serve any IP address?)

Hope this detail is sufficient for understanding the problem I’m facing. Help, please 🙂

EDIT 2:
Oh well, found the solution 🙂 Have to add this before cherrypy.quickstart() call

cherrypy.config.update({'server.socket_host': '0.0.0.0',
                        'server.socket_port': 80,
                       })
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T12:20:39+00:00Added an answer on May 21, 2026 at 12:20 pm

    The cherrypy.quickstart function takes a config argument, which can be a dict, an open configuration file, or a path to a configuration file. I favor using a path to a configuration file because that minimizes the hardcoding of settings that you might prefer to control from a startup script.

    In addition, since you control the server, you could configure a reverse proxy to route requests to the CherryPy application. This gives you quite a bit of flexibility. For example, if you wanted to, you could run multiple instances of the CherryPy application in parallel, each configured to listen on a different port.

    Here’s a sample configuration file for nginx, instructing it to forward requests to a single instance of your CherryPy application:

    server
    {
      server_name your.hostname.com;
    
      location / {
        proxy_pass http://127.0.0.1:8080/;
      }
    }
    

    And here’s a sample configuration file instructing nginx to load-balance across two instances of your application, which are listening on the loopback address at ports 33334 and 33335:

    upstream myapps  {
      server 127.0.0.1:33334;
      server 127.0.0.1:33335;
    }
    
    server {
      server_name your.hostname.com;
    
      location / {
        proxy_pass  http://myapps;
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a server that is running Ubuntu Linux Server Edition. I once had
I have a Linux web server farm with about 5 web servers, web traffic
I have two machines I work on: Windows Client (Development Machine) Linux Web Server
I have a Subversion repository (running SVN 1.6.6) on an Ubuntu Linux server, and
I have a server/client app on a Linux box. If the server is not
I have a linux box with a bank of modems and need to create
I have a directory on a linux box that I want to make publicly
I'm going to rebuild my Linux box [yet] again. I have to create a
I have a FreeBSD box with Bash set up. I'm used to Debian Linux
We have a Linux server application that is comprised of a number of open-source

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.