Guest Vegettex Posted March 3, 2005 Report Share Posted March 3, 2005 (edited) Hi everybody, well lets get straight to the point, i am new in the whole GNU/Linux world. I succesfully installed Mandrake 10.1. After that i wanted to set up a www server using apache. I installed it with the 'Software Installer'. When i go to http://localhost/ i see a page with Welcome to the Advanced Extranet Server, with lots of information in it. I found out that i need to put my website on the ./var/www/html/ directory. But here comes the problem... when i want to delete the current files, the information pages that is, i get permission denied. Neither can i change the chmod configuration because 'only the owner' can change it. Any help would be great :) Thanks in advange, Vegetex Edited March 5, 2005 by Vegettex Quote Link to comment Share on other sites More sharing options...
fissy Posted March 3, 2005 Report Share Posted March 3, 2005 The files are owned by root so that not just any old user can mess up your website. If you want to change it so you own the files, login as root (su at a terminal) then do the command "chown -R username /var/www/html" without the quotes Quote Link to comment Share on other sites More sharing options...
Guest anon Posted March 3, 2005 Report Share Posted March 3, 2005 Welcome to the board. /var/www/html is the default location for your web files and as fissy says above, you would need to change the ownership. But you can serve up web pages from any directory, so if you created a directory in /home/you/www/html then edited the apache config file and changed the default location to your new directory, you could then edit/delete files without becoming root. Quote Link to comment Share on other sites More sharing options...
Guest Vegettex Posted March 3, 2005 Report Share Posted March 3, 2005 Ah thanks! That was the small trick. Other people can access my site now, from the outside that is... but it loads amazingly slow. Is this a problem with the configuration or something else ? Quote Link to comment Share on other sites More sharing options...
Guest anon Posted March 3, 2005 Report Share Posted March 3, 2005 Don't know. Is IT4U your website or are you just posting from that IP ? If so whats your website url? Quote Link to comment Share on other sites More sharing options...
Guest Vegettex Posted March 3, 2005 Report Share Posted March 3, 2005 (edited) yeah that is the site. don't talk about the layout or the code because this is just a trial version. the normal link should be: .... oh now i think of it, how do i add another domain? I added my ip adres in the domain provider panel, to link it to my ip adres. But i have another domain, i assume i have to make another /var/www/site2/ for it and edit the apache config file ? Edited March 3, 2005 by Vegettex Quote Link to comment Share on other sites More sharing options...
Guest anon Posted March 3, 2005 Report Share Posted March 3, 2005 I am viewing it from London and it loads up OK for me. To add your second domain create a site/2 and look towards the bottom of the apache config file for info on creating virtual domains, they give some examples in the file. Quote Link to comment Share on other sites More sharing options...
fissy Posted March 3, 2005 Report Share Posted March 3, 2005 I made a short guide to virtual hosting here: http://mandrakeusers.org/index.php?showtopic=17146 Quote Link to comment Share on other sites More sharing options...
Guest Vegettex Posted March 3, 2005 Report Share Posted March 3, 2005 First of all i want to for your support :) Secondly i am doing something wrong... I followed fissy's guide...this is what i did: I edited /etc/httpd/conf/vhosts/Vhosts.conf and i added on the bottom: NameVirtualHost *:80 #De omvalit host <VirtualHost 192.168.1.10> ServerName xxx ServerPath /var/www/xxx DocumentRoot /var/www/xxx/htdocs ServerAlias xxx </VirtualHost> #De vegettex.net host <VirtualHost 192.168.1.10> ServerName yyy ServerPath /var/www/yyy DocumentRoot /var/www/yyy/htdocs ServerAlias yyy </VirtualHost> <Directory /var/www/xxx/htdocs> order allow,deny allow from all </Directory> <Directory /var/www/yyy/htdocs> order allow,deny allow from all </Directory> When i try service apache restart, i goes fine but then when i go to http://localhost ( after adding pages to the dirs ) i get Permission Denied Quote Link to comment Share on other sites More sharing options...
fissy Posted March 4, 2005 Report Share Posted March 4, 2005 I think the problem is that in your main httpd2.conf file (called something like that and located in /etc/httpd/conf/ or somewhere similar) has a localhost site and document root defined which aren't i n your virtual hosts file. You may want to create a VirtualHost *:80 for localhost with the httpd.conf defined document root or perhaps change that DocumentRoot and make localhost a ServerAlias of one of your existing VirtualHosts. Unless you're a guru this is always a bit of a game of trial and error, Apache's log files are usually quite helpful. A few other things: * Your server alias shouldn't be the same as the server name, I don't know if that would cause errors in apache but its not necessary. You'd use it to point www.yyy.com or maybe zzz.net to the same site as yyy.com * I think if you have the "NameVirtualHost *:80" directive, each of "<VirtualHost 192.168.1.10>" needs to read <VirtualHost *:80> instead. * If you also want one of the hosts to use HTTPS as well, NameVirtualHost *:443 <VirtualHost *:443> ServerName domain.net ServerPath /var/www/domain.net DocumentRoot /var/www/domain.net/htdocs ServerAlias www.domain.net </VirtualHost> Because the requested website is encrypted in the SSL-ised HTTP packet, you can only have one HTTPS site per IP address. Quote Link to comment Share on other sites More sharing options...
Guest Vegettex Posted March 5, 2005 Report Share Posted March 5, 2005 Thanks to some private help from fissy it has been solved :) Really appreciated your help, from both :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.