Zentyal Forum, Linux Small Business Server
Zentyal Server => Installation and Upgrades => Topic started by: HANNES1985 on November 19, 2009, 05:12:50 pm
-
Hi this might sound like a stupid Q but I'm struggling for quite a wile now to upload a web page to Apache on my ebox server ( now ver 1.2) I used core ftp but looking to the documentation it seems that you would not be able to upload via ftp ,ssh, or any of the protocols core ftp provides could anyone point me in the right direction please I can access it and even via my dns IT WORKS comes up when entering my URL so all is fine just need to upload contend now ??? ???
-
You can upload the content to the home of the admin user by scp, and then you can move it to the proper directory by ssh.
-
Okay so what I understand is I enable file server on ebox administration page for me (the administrator) and upload everything in there (This part is already done )
Now login on to page via ssl and transfer from admin user to www data file? How do I go about doing this???
-
Uploading via file sharing (samba) as you have done is also valid, I told you to do it using "scp", but no problem, it's ok. Then you can use ssh, not any ssl web page. Using ssh you get a shell where you can execute any command like "mv" to move the files.
-
not any ssl web page. Using ssh you get a shell where you can execute any command like "mv" to move the files.
Any specific programs I can use in this case? Sorry but Im new to the uploading process In ebox!
-
ssh is a console program itself, if you want a windows client you have putty.
You can get a shell from any machine in the internal network with "ssh ebox-ip-address".
-
Can you explain this in a bit more detail for me please
Thanx for your help thus far!!
-
Download 'putty' from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) and use it to SSH into your ebox machine.
Once you have done that, you have a shell where you can write commands to move the files you have uploaded to the appropriate place. You can read about moving files here:
http://www.ee.surrey.ac.uk/Teaching/Unix/unix2.html (http://www.ee.surrey.ac.uk/Teaching/Unix/unix2.html)
The directory used by the webserver is /var/www, so you'll need to move the stuff there.
Cheers!
-
Thanx for you help just one Q though id like to know what do you type before the /var/WWW to get into this directory cos it tells me no such file or directory when I type this into putty after the login process
-
The directory is /var/www, in lower case.
-
Thank you I got that part right but now it tells me I cant move it because access denied
I used mv home/hannes/CSIWISP.html -t /var/www
mv: cannot move `/home/hannes/CSIWISP.html' to `/var/www/CSIWISP.html':
Permission denied
What can I do now Sorry to bug you like this but this is the only way I would be able to learn how to do it myself!!
-
Thank you I got that part right but now it tells me I cant move it because access denied
I used mv home/hannes/CSIWISP.html -t /var/www
mv: cannot move `/home/hannes/CSIWISP.html' to `/var/www/CSIWISP.html':
Permission denied
What can I do now Sorry to bug you like this but this is the only way I would be able to learn how to do it myself!!
You have to run the command as administrator, for that, just write 'sudo' before the command.
You can move the file using:
sudo mv /home/hannes/CSIWISP.html /var/www
-
Thanx I got it eventually thank you all for your help I appreciate it !!! :)
-
Okay all is uploaded but still cannot see the contend on the web page I did restart the server service an ideas what could be wrong?
Sorry I guess I have to upload an .htm file to view it by just typing the www.domain.com in !!
will fix this later thank you guys for all your help Im done for now have to go sleep now!!
-
What is the URL that you are trying to access?
-
I need to type in www.mydomain.com/CSIWISP.html to view my contend I ll go Change the contend to CSIWISP.htm and see if I can access the contend by just typing in the www.mydomain.com
Well That did not work either any ideas??
It just keeps poping it works when I go to www.mydomain.com
-
Try to name the page as index.html instead of CSIWISP.html
-
Still does not work not index.html or index.htm any ideas??
-
So you are still getting the "It works" page after replacing the old index.html with a copy of your page or a link to it?
If you execute ln -sf CSIWISP.html index.html in /var/www it should work.
-
The www file was empty seems that there is anouther file or conf I need to change in order to view my webpage by just typing in www.mydomain.com!!
I am looking for any conf that has to do with redirections if /var/www is empty !!
So you are still getting the "It works" page after replacing the old index.html with a copy of your page or a link to it?
If you execute ln -sf CSIWISP.html index.html in /var/www it should work.
Could you give me a bit more detail on how to do this Im new to the putty thing and Ive checked could not find any directory with -sf
Please I`d really like to get this right coz then Ive configured all the packages I need in ebox!!
next then is getting a 4tb external hard drive and redirect www-data to it so I can change the contend of the website without using putty coz its a looooong process!!
One Q though is it possible to change the page you get from the server when you have a timeout ??
-
-sf are arguments of the ln command that it's used to make links to files. You have to execute that command inside the /var/www directory (use cd command for that).
-
Thank you just so I dont bugger anything up the location of my website is /var/www/index.htm
how do you prepose I go about linking the file to www.mydomain.com??
-
Run:
cd /var/www
sudo ln -sf CSIWISP.html index.html
Cheers!
-
Note: There is another way to put the files where you want them, though some do not like to give ssh root access.. It's called winscp
If you do wish to do it with winscp,
Make a password for root
passwd root
Note: Make it a strong password.
Then download winscp and just copy the files with a gui right to where you want them..
You can also disable password logon and use a key for authorization. See here. http://winscp.net/eng/docs/faq_su
Course, I do it with a rsync nightly upload so I don't even have to mess with it. Just edit the files and they will be uploaded later automagically.. (one of the benefits to running Linux on the desktop as well) But there is rsync for windows.. :)
-
cd /var/www
sudo ln -sf CSIWISP.html index.html
This code worked perfectly Thank you very much !!!
-
Hi to all!
after a update to my website via website maker the new upload`s links does not work .
It keeps on referring to the old version of the website how would I go about fixing this problem?
-
I just needed to upload everything again and run the little code posted by isaac
-
All is running well can any one tell me if its possible to link all the samba user directories to separate files in the /var/www directory?
Ive added a user USER at users and groups and gave it 100mb disk space via samba
then ticked the enable per user public html and created a virtual host USER at webserver what I want to do now is being able to just paste everything into the network drive created via the samba account and It should then show when I access www.mydomain/USER
-
Okay all is running well
One question!
Is there a way I can keep the website contends in my samba directory root/home/admin,
and add a script file to my /var/www directory wich then redirect the clients to root/home/admin/index.html for web browsing
This way I can setup a network drive in windows and use my web page editing program to change my site as I want to without having to use putty or winCSP?
I can then use the same method to give my clients the same service via they're samba directory
-
cd /var/www
sudo ln -sf CSIWISP.html index.html
Maybe I can use the ln -sf function like
dir:/var/www
sudo ln -sf CSIWISP.html /home/admin/CSIWISP.html
and for user (joe)
dir:/var/www/joe
sudo ln -sf index.html /home/joe/index.html
Don't bite my head off if this is wrong im still learning here!! ;D
-
Maybe I can use the ln -sf function like
dir:/var/www
sudo ln -sf CSIWISP.html /home/admin/CSIWISP.html
and for user (joe)
dir:/var/www/joe
sudo ln -sf index.html /home/joe/index.html
Okay I've tried this and it doesn't work any help on this matter??