2

I have this Building Simulator application that uses Django. It simulates different actions in a building and you can query it to see what is the temperature inside etc. I set it up on my Ubuntu Server 12.10 and it is located in my /home/myusername/Documents/BuildingSimulator directory. It listens on port 8000 so when I open: 127.0.0.1:8000/admin locally, I can see admin panel. When I try to access it form my local network I can't. I think that is happening due to the fact that it is located in my /home/myusername directory which is available only to myusername user. Where should I put this application so that it can be accessed form anywhere? Or what should I do to make this folder accessible to anybody?

I should add that I have Webmin running on port 10000 and It works fine when I access it remotely.

Here is the output of sudo netstat -tlnp:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 192.168.122.1:53        0.0.0.0:*               LISTEN      1530/dnsmasq    
tcp        0      0 192.168.1.39:53         0.0.0.0:*               LISTEN      1252/named      
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      1252/named      
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      966/sshd        
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      749/cupsd       
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      1500/postgres   
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      1252/named      
tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN      784/smbd        
tcp        0      0 127.0.0.1:8000          0.0.0.0:*               LISTEN      13713/python    
tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN      1256/dovecot    
tcp        0      0 0.0.0.0:995             0.0.0.0:*               LISTEN      1256/dovecot    
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1278/mysqld     
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN      784/smbd        
tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN      1256/dovecot    
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN      1256/dovecot    
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1806/apache2    
tcp        0      0 0.0.0.0:10000           0.0.0.0:*               LISTEN      1766/perl       
tcp        0      0 0.0.0.0:6000            0.0.0.0:*               LISTEN      1713/X          
tcp6       0      0 :::21                   :::*                    LISTEN      2432/proftpd: (acce
tcp6       0      0 :::53                   :::*                    LISTEN      1252/named      
tcp6       0      0 :::22                   :::*                    LISTEN      966/sshd        
tcp6       0      0 ::1:631                 :::*                    LISTEN      749/cupsd       
tcp6       0      0 ::1:953                 :::*                    LISTEN      1252/named      
tcp6       0      0 :::445                  :::*                    LISTEN      784/smbd        
tcp6       0      0 :::993                  :::*                    LISTEN      1256/dovecot    
tcp6       0      0 :::995                  :::*                    LISTEN      1256/dovecot    
tcp6       0      0 127.0.0.1:8005          :::*                    LISTEN      1849/java       
tcp6       0      0 :::139                  :::*                    LISTEN      784/smbd        
tcp6       0      0 :::110                  :::*                    LISTEN      1256/dovecot    
tcp6       0      0 :::143                  :::*                    LISTEN      1256/dovecot    
tcp6       0      0 :::8080                 :::*                    LISTEN      1849/java       
tcp6       0      0 :::6000                 :::*                    LISTEN      1713/X   
2
  • 1
    Nothing to do with permission or directory location. If you can access it via a web browser the process listening on port 8000 can access the files. Please add to your question the output of sudo netstat -tlnp. What does happen when you try to access the website from another computer? Mar 2, 2013 at 18:02
  • @EricCarvalho When I try to access from another computer Chrome says: Oops! Google Chrome could not connect to 192.168.1.39:8000.
    – Booyaches
    Mar 2, 2013 at 20:11

1 Answer 1

1

Django Documentation:

django-admin.py runserver

Starts a lightweight development Web server on the local machine. By default, the server runs on port 8000 on the IP address 127.0.0.1. You can pass in an IP address and port number explicitly.

Note that the default IP address, 127.0.0.1, is not accessible from other machines on your network. To make your development server viewable to other machines on the network, use its own IP address (e.g. 192.168.2.1) or 0.0.0.0 or :: (with IPv6 enabled).

You have to run:

django-admin.py runserver 0.0.0.0:8000

Then you'll be able to connect from network.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .