removing pylons page from my site

0 views
Skip to first unread message

gazza

unread,
Mar 13, 2010, 10:02:28 AM3/13/10
to pylons-discuss
Hello,

I am running my pylons app on a production server at the moment.

I would like to know two things:

1) How do you remove the pylons page eg

http://AA.BB.CC.DD:5000

I would like to replace it with my own page?

2) I would like to replace the IP address and port with my domain
name, how do I do this? Is there a setting I need to add to the
production.ini?

Thanks for the help and all the fish.

Thanks,
Gazza

cd34

unread,
Mar 13, 2010, 12:19:38 PM3/13/10
to pylons-discuss
On Mar 13, 10:02 am, gazza <burslem2...@yahoo.com> wrote:
> 1) How do you remove the pylons page eg
>
>    http://AA.BB.CC.DD:5000

public/index.html You can remove it and it'll display your root
controller

may want to look at

config/routing.py

perhaps add:

map.connect('/{action}', controller='root')

you might also add a handler for errors that is your own rather than
using the default 404 page.

> 2) I would like to replace the IP address and port with my domain
> name, how do I do this? Is there a setting I need to add to the
> production.ini?

[server:main]
use = egg:Paste#http
host = 1.2.3.4
port = 8080

lists the hostname and port that answers. Change it to port 80, make
sure you don't have another server bound to the same IP address that
you assign and replace 1.2.3.4 with the IP address you want Pylons to
answer.

However, that is if you want to run paster externally. If you want to
run pylons behind mod_wsgi, your apache config would take care of
answering on the proper port, etc.

Getting the domain to point to your site requires you to change the
DNS to point the domain at the IP. Your domain name registrar or your
hosting provider would provide the capability to point your DNS name
at a particular IP address.

gazza

unread,
Mar 13, 2010, 12:52:13 PM3/13/10
to pylons-discuss
Really appreciate that info.

Should be up next week. At for testing against.

Cheers,
Gazza

Mengu

unread,
Mar 13, 2010, 11:01:08 AM3/13/10
to pylons-discuss
hello gazza,

if you remove public/index.html and add map.connect('/',
controller="controller name", function="controller method") to your
config/routing.py, you will be fine. :)

good luck.

Reply all
Reply to author
Forward
0 new messages