How would I broadcast a subdomain/virtual name on a local server with people connected to the same network

Posted by Sarmen B. on Ask Ubuntu See other posts from Ask Ubuntu or by Sarmen B.
Published on 2012-10-17T17:42:12Z Indexed on 2012/10/19 23:21 UTC
Read the original article Hit count: 131

Filed under:
|
|

I have a server connected to the router which has ubuntu 12.04. It is has apache/mysql/php all installed ready to go. the folder structure is like this:

/var/www -- this isnt the root
-/libs
-/logs
-/public - this is the root
-/vhosts - all subdomains go here

I have a folder in vhosts named mysite. I went into /etc/apache2/sites-available and created a file and here are the contents -> (vhost file). and I also added an entry in /etc/hosts file containing: 127.0.1.1 mysite.dev and I also did

sudo a2ensite mysite

i tried accessing the site from a computer via mysite.dev and our public ip into the server but i was not able to view it. the public directory in the structure above does display on all computers when i try our public ip. but for anything added in vhosts the site wont show. there is no domain attached its just our ip. I tried changing the port from 80 to say 9999 in the mysite file in sites-available and tried myip:9999 but that didnt work either. what am I doing wrong?

edit: i forgot to mention that the server is dmzed on the router.

© Ask Ubuntu or respective owner

Related posts about apache

Related posts about webserver