Hi there.
Have been having some problems with my server lately and thought that now was a good time to solve the problems.
I use the folder
/var/www/ as my base web folder, in there I have a folder named
default (
/var/www/default/) which is the main page that visitors see.
Most people visit the site through the
IP (
for now: 123.123.123.123) and is then via a
.php file sent to
123.123.123.123/default/ .
This works fine except that I also have folders called
mine (
/var/www/mine/),
else (
/var/www/else/) and
global (
/var/www/global/) and I don't want people to be able to visit them through the ip like this
123.123.123.123/global/ .
I only want visitors to be able to see these folders page if coming from a certain
URL (
global.example.com) and not the
IP.
I have it so that the visit through the
URL is handled by a
VirtualHost rule and sent to the right place, what i can't seem to fix is the problem with the
IP still sending the visitor to the subfolder.
If anyone understands what I mean and can help me please do so
-----
I also have a problem with the user for
apache2. Standard is set to
www-data and group
www-data but this causes problems when uploading files via a web form, because then when I ssh in as my user I have no rights to the files.
Can I somehow set a different user for certain
VirtualHosts or maybe just change the main
apache2 user to my own account, or will this cause any problems along the way?