Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

Configure Apache for home network

Writer Sebastian Wright

I'm on U13.10 and have installed LAMP per the Tux Tweaks instructions (see their website -- apparently I'm not yet allowed to post the actual link). Then I followed Tux Tweaks instructions on configuring Apache for custom home directory access: (Again, not allowed to post link, but see "How to Configure Apache Web Server on Linux".) All of this is just fine and I've got various directories in my home folder able to be accessed simply by going to, e.g.,

which is pointing to /home/me/mywebdevdir/

My issue is I've got a home network running open ssh server, and that computer's apache cannot do this trick. If the ssh server is on 192.168.0.x then cannot be accessed/seen -- although goes to the default /var/www/... just fine. Any ideas how I can extend the configuration to home directory access across home network?

1

1 Answer

Im not 100% sure what you are asking but if im reading the question right. Do you want to directly access your Website from anywhere in your Home Network by using the machines IP address?.

If this is case. follow the procedure below, edit 000-default.conf add your website folder name after DocumentRoot /var/www/. Save and exit the file. Restart Apache server and type IP address in a browser on any home system in your network. Your index page will loaded. If you requite Remote access then you need to add the IP Address of your web server in the section Virtual Servers on your home Router and make sure the Port is set to 80.

$ cd /etc/apache2/sites-enabled/
$ ls
000-default.conf
$ cat 000-default.conf
<VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. #ServerName ServerAdmin webmaster@localhost DocumentRoot /var/www/mywebsite # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example the # following line enables the CGI configuration for this host only # after it has been globally disabled with "a2disconf". #Include conf-available/serve-cgi-bin.conf
</VirtualHost>
3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy