[Techtalk] Accessing a web page on my server - update 3
chris
chris.madrone at gmail.com
Wed Feb 6 23:34:06 UTC 2013
Hi Billie,
To serve up webpages from the user directory (/home/billie0w/public/cslsa), you'll need to install the userdir Apache module. Once that's set up, you won't need to worry about VirtualHost configurations unless you need to serve multiple websites from the /var/www directory as well. The userdir steps I sent earlier should still work for your machine?
In case you really want to set up VirtualHosts, here are some comments and example of a very basic VirtualHost configuration in case it's useful:
you may want to check that /etc/apache2/ports.conf has a matching entry for the *80 in the VirtualHost. Specifying port 80 isn't usually necessary, but it does need to be consistent between ports.conf and the VirtualHosts.
== ports.conf located in /etc/apache2/ports.conf ==
Listen 80
NameVirtualHost *:80
==Virtual Host located in /etc/apache2/sites-available ==
<VirtualHost *:80>
#while I believe you could make the DocumentRoot work with your designation (/home/billie0w/public/cslsa) I think it might behave inconsistently with scripting languages without implementing userdir. Usually, the Ubuntu web directory is /var/www
DocumentRoot "/var/www/webDirectory"
#ideally, this should be the url of the website (sudo cat /etc/hosts )
ServerName www.websiteurl.com
#logging looks good
# email only matters if you care about what email address is displayed on server error messages in the browser
</VirtualHost>
You would access the above in your browser at localhost/webDirectory
hth
chris
On Feb 6, 2013, at 10:57 AM, Billie Walsh <bilwalsh at swbell.net> wrote:
> Looking over your suggestions and reading
>
> https://www.digitalocean.com/community/articles/how-to-set-up-apache-virtual-hosts-on-ubuntu-12-04-lts
>
> I've come up with this to enable the second site:
>
> <VirtualHost *:80>
> ServerAdmin webmaster at localhost
>
> ServerName cslsa
> <Directory />
> Options FollowSymLinks
> AllowOverride None
> </Directory>
> <Directory /home/billie0w/public/cslsa/>
> Options Indexes FollowSymLinks MultiViews
> AllowOverride None
> Order allow,deny
> allow from all
> </Directory>
>
> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
> <Directory "/usr/lib/cgi-bin">
> AllowOverride None
> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
> Order allow,deny
> Allow from all
> </Directory>
>
> ErrorLog ${APACHE_LOG_DIR}/error.log
>
> # Possible values include: debug, info, notice, warn, error, crit,
> # alert, emerg.
> LogLevel warn
>
> CustomLog ${APACHE_LOG_DIR}/access.log combined
>
> Alias /doc/ "/usr/share/doc/"
> <Directory "/usr/share/doc/">
> Options Indexes MultiViews FollowSymLinks
> AllowOverride None
> Order deny,allow
> Deny from all
> Allow from 127.0.0.0/255.0.0.0 ::1/128
> </Directory>
>
> </VirtualHost>
>
> I'm wanting this site open as 192.168.1125/~cslsa/ from a local computer.
>
> Right now the server isn't connected to act as a web server right now. Trying to learn more before I make that final step.
>
> --
>
> “Only two things are infinite, the universe and human stupidity, and I’m not sure about the former.”
> -Albert Einstein
>
>
> _ _... ..._ _
> _._ ._ ..... ._.. ... .._
>
> _______________________________________________
> Techtalk mailing list
> Techtalk at linuxchix.org
> http://mailman.linuxchix.org/mailman/listinfo/techtalk
More information about the Techtalk
mailing list