Forum archive
Website setup
Hi I've been looking for information on the LAMPStack regarding setting up an actual site with it but I can only seem to find the initial installation but nothing beyond.
I apologize if this has been asked before, I tried searching the forums and documentation thoroughly before posting, but I've setup my LAMPStack, setup the network bridge, and I can log into the webmin through my local network (192.168.1.116:12321). I have also created a user account in the www-data group and assigned it's home directory to /var/www and I keep seeing online people saying "just upload to /var/www" but it appears that's where the webmin is located.
Am I doing something wrong or should I create a subfolder? 192.168.1.116/website will display the index.html I created but do I really have to work within a subfolder? If I overwrite the index.php in /var/www will I lose webmin access?
But there are many different ways to configure a web server...
.htaccess files can be very handy, especially on shared hosting servers and/or if you want different things going on in different folders (eg public and private areas of your website). But when you're getting started I think they add unneeded complexity, especially when you are running your own LAMP server (al la TKL).
The way the TKL LAMP appliance is configured by default should be a great starting point for having a little play and getting the hang of things. Just drop your html and/or php (etc) files into /var/www and you'll be good to go. If you want to keep the default TKL page you could always rename it, eg:
Keep in mind though, by default any files that you drop in there (via SFTP etc) will have the default owership and permissions of the user doing it. Some scripts may need to be owned by the webserver account to function properly.
And yes you can go directly to Webmin via port 12321 (as you suggest in your post above). The other stuff is there too (eg phpMyAdmin via port 12322, etc).
Also I personally prefer to admin Apache manually rather than Webmin (personally I don't like the way it mangles the config, also I have had some bizarre unexpected things happen...). Learning how to manually configure it is not that hard once you get your head around it. The config for the default site can be found in /etc/apache2/sites-available/default, but personally I'd copy it and play around with the new one. Worst case you can go back to default...
If you want to do that, copy the default site:
then disable the default site, enable the new and reload Apavhe config:
Also an FYI if you plan to learn to config Apache manually, be a little cautious following examples/tutorials found via google. The installation of Apache2 in TKL/Ubuntu/Debian is not the default provided by Apache (and is therefore different to stuff related to Apache on Red Hat/Fedora/CentOS/etc). Some stuff is relevant, but generally I suggest that you stick with Ubuntu tutorials (TKL v11.x is based on Ubuntu 10.04) where possible...