Lack basic understanding of permissions(apache permissions problem)
I am very new to linux. The first time i ran a linux machine was one Saturday.
Anyway i am trying to set up an apache web server, all i want to do is play around with html and post it on my unbuntu server so it is available to the internet.
I am also trying to install samba but i am having trouble with that so for now i am using winscp.
Ok, so i made a folder in my home directory for webstuff, and set up apache to look in that folder.
I put my index.html file into the /webstuff folder.
But when i go to my website, it says 403 error unable to access "/"
Can anyone help me out? Did i make the folder in the right place?
I do not want people being able to access my / folder so maby i made the web stuff folder in the wrong place?
Also i thought i would just put my inded.html file inside of the default one apache gives you, but when i tryed to transfer index.html it said permission denied.
Anyway any help on how to set up permissions so i can use apache and transfer my html files from my remote desktop to my server would be great!
The "normal" way for publishing user-owned files is to stick them
in ~/public_html .... not ~/webstuff
Of course whether or not user directories are enabled depends on
your distro and whether or not you have done anything to apache's
To get more targeted responses I'd recommend that you add your
distro to your profile (or, if you're going to be distro-hopping,
to the post which you are inquiring about certain features in).
Oh sorry, i am using unbuntu server edition.
Ok so i made a directory in ~$
username@server:~$ mkdir public_html
When i look at the permissions it says
So the owner has read, write, and execute privilege's the group has read and execute, and the any other user has read and execute privileges?
I am not positive what other user is. Or what exactly that means if anything about internet users connecting to my website.
But i still get the 403 error when i try to view my website.
I *really* hope your machine isn't hosted up in the wild
while you're trying to learn the ropes; that would be like
trying to figure out what all those pedals and the wheel
in a car are for while cruising down a highway.
To access index in your users home you'd go
Please give some detail as to what your ultimate goal is,
not a little (perceived) logical step to get there.
Goals for my server are as follows.
1. I would like to host a website.
2. I would like to store files on it to backup my desktop
What i have done so fair.
1. I have installed openssh so i can access my server from my room.
2. I have installed webmin (though i do not think i want to use it very much)
3. I installed apache.
As fair as security goes i have only configured ssh.
I have a key auth for ssh, i disabled password login, and i disabled root login, oh and i changed the standard port.
When you say in the "wild" do you mean the internet?
My server is in my garage and i am in my room, the computer in my room is set up on a different router than the server in the garage.
I want to access it from my room so i thought i needed ssh.
So yes i believe it is in the wild.
Well, let's hope your apache is hardened, stable and recent enough ...
So to get to the page you placed in the home of the user on the
server in the garage:
http://your-servers.public.ip or dns-name/~your_username
If the "~your_username" bit is NOT what you want, you should be
able to copy the file(s) from there to your servers web-home using
"sudo cp -r $USER/public_html/* /var/www/htdocs" (or where ever the
web-root is on an Ubuntu machine).
Ok so what i did was just edited the default index.html and pasted my own html file.
Anyway so after i did that i typed this
The output was this
(13) permissions denied: make_sock could not bind to address [::]:80
(13) permissions denied: make_sock could not bind to address 0.0.0.0:80
no listening sockets available, shutting down.
Unable to open logs.
But when i go to mydomainname.com my webpage is working.
This error message scares me. The only thing i remember doing was editing the default index.html with nano and copy/pasting my own html code, i saved it then restarted it and got that error message.
Its not effect me now except for the fact that i dont like error messages.
So if anyone knows what i did or whats going on and could fill me in that be great!
Edit: Ok i found i am getting the error because HTTP is using port 80.
How do i change this so the error will go away?
I was not running /etc/init.d/apache 2 restart as sudo
Not executing it as sudo gave me that error.
I guess this thread is solved. Even though i only masked my problem by copy/pasting html code into an all ready used default folder.
Maybe later when i get more experience i will come back to it and try and solve it.
Thanks for your help Tinkster.
|All times are GMT -5. The time now is 06:49 AM.|