# How to host website on OpenSuSE 10.2?



## aditya.shevade (Apr 13, 2007)

Hi

I have had enough experiences of free web hosts, and now I would like to host my site on my PC. It is on 24X7 with internet, so I am thinking of giving it a try.

The site has HTML and also some Javascript (No php, perl, etc...). 

Can anyone tell me how to host the site on OpenSuSE 10.2? I searched but could not find anything. Please give step by step procedure if you can.

Aditya


----------



## mehulved (Apr 13, 2007)

Set up a apache web server, see *en.opensuse.org/Apache
Where did you search and for what?


----------



## Pathik (Apr 13, 2007)

better install Xampp... its better and easier to use... also includes support for php, sql and stuff


----------



## mehulved (Apr 13, 2007)

It's easier to manage Apache from SUSE. They've put GUI for anything and everything  
And you will find more docs out there for apache


----------



## kalpik (Apr 13, 2007)

^^ But that point and click GUI becomes more cumbersome if you have to troubleshoot anything! I once tried OpenSuSE's Apache.. It was nothing but crap, had to edit 2-3 files to get it going.. I would also recommend XAMPP, its a no nonsense package of Apache, Mysql, PHP


----------



## aditya.shevade (Apr 13, 2007)

@tech_your_future... I searched on "Hosting Website OpenSuSE 10.2" and "Web Server OpenSuSE 10.2"

I want a little detailed info.... I will try this out and then see if there are any more things (problems ) 

Aditya


----------



## mehulved (Apr 13, 2007)

If you gonna use XAMPP then check it's docs, if apache then well maybe Suse's site till be good.
Kalpik I know, point and click approach of Suse just messes it all up. That's why I like gentoo and slackware  and even debian is very good when it comes to servers.


----------



## aditya.shevade (Apr 14, 2007)

OK. I downloaded and installed Xampp. I started it, it started fine, but whenever I try to open *localhost, then there is a problem.

The message says that the directory is either read protected or server cannot access it, please contact the webmaster.

What should I do?

Aditya


----------



## Pathik (Apr 14, 2007)

i think u need to chmod the localhost directory... For starters chmod it to 777 to give it all permissions


----------



## kalpik (Apr 14, 2007)

yup do "sudo chmod 0777 /opt/lamp/htdocs -R"


----------



## ravi_9793 (Apr 14, 2007)

between can I ask you..wht uploading speed U have.


----------



## aditya.shevade (Apr 14, 2007)

Thanks. I did that. Now, where should I put all the contents of the site and what address should I type when accessing the site from other computer?


----------



## mehulved (Apr 14, 2007)

chmod 777. Now you are opening a nice security hole. Congrats!
Put the contents in /opt/lamp/htdocs.
To access the site from outside you need to type in your IP address or your domain name, if you have one.
If you have dynamic IP then you can try something like *www.dyndns.com/


----------



## aditya.shevade (Apr 14, 2007)

Thanks.. I did that. Now one more thing... How can I create I directory so that no one will be able to read the files in it without a username and password? Like you have here in the forum.. userCP needs a username and password......
Aditya


----------



## Pathik (Apr 15, 2007)

now ur getting into advanced stuff.. U need a script 4 that. Btw do u hav a static or dynamic ip??.


----------



## aditya.shevade (Apr 15, 2007)

^^ I have bsnl broadband. I use the IP address assigned by DHCP. So I guess that it is dynamic.... dunno... But it is the same all the time for the particular port. 

I think dynamic.

By the way... which kind of script? Can't I just write a javascript code in my html page... link it to a code file in a directory, and make sure that people cannot read the contents of that directory without a username and pass? So that the .js file will remain unaccessible?

Aditya


----------



## mehulved (Apr 15, 2007)

So, you have dynamic IP, not at all a good way to host a web server. You will have to give the IP to a person who want to connect, everytime. I think dyndns offer services to bypass that thing.
The script written in asp or php would be way better. If it's javascript, i believe people can just read the code and understand how to bypass it.


----------



## kalpik (Apr 15, 2007)

Or you can just google for .htaccess passwords


----------



## NucleusKore (Apr 15, 2007)

tech_your_future said:
			
		

> So, you have dynamic IP, not at all a good way to host a web server. ........



You can also try *www.no-ip.com


----------



## aditya.shevade (Apr 15, 2007)

Thanks kalpik. I tried it and it worked.

But what I was looking for was something like an email system... (Not a mail server), but you enter username and pass and then you get to access private fies. In the .htaccess method, once you give username and pass, you can access the files till the browser is closed. There is no logout function. And also, you are asked for username and pass when you want to access files, there is no option of logging in. 

About the dynamic address. As I said, unless I change the port, the IP address is fixed, so that is not a big problem right now. But thanks for the sites. I will check them out as soon as the site is finished.

Aditya


----------



## Zeeshan Quireshi (Apr 15, 2007)

well mate then u should try bytehoard , it's a web-based file manager , along with all things u want

*www.bytehoard.org/


----------



## mehulved (Apr 15, 2007)

Hey aditya I hope you still have 777 permission on your /opt/lamp/htdocs. Pleae give me your IP address, since I can read, write and execute anything I like on that directory, I'd like to play a bit.


----------



## kalpik (Apr 15, 2007)

^^ My server at kalpiknigam.com has all files chmodded to 0777.. Try your heart out there 

@aditya, for a logout system, you will have to use scripts only (PHP would be easy..) And just a suggestion, if you only want to share files, why not run an FTP server with individual passwords for each user?


----------



## aditya.shevade (Apr 15, 2007)

@Tech_your_future.... Sure, I will give you mine as soon as you give me yours....

@Kalpik... Actually it's not only sharing files. We are (me and my friends) kind of trying to build up this database where name, address, mail IDs, Birthdates, etc of all of us will be stored. It is kind of useless, I know. But they want it. I thought that this might be the best idea.

And as no one.... (really , you can visit anytime) knows anything (not anything really, but very little) about computers.... it's up to me.... Now you have the idea of my knowledge, so I think you can guess what is their level.... .... Nothing serious... we have CD/DVD/pendrives to share files.

Aditya


----------



## kalpik (Apr 15, 2007)

Hmm.. For that, the best option would be to learn PHP  Although im not aware of any premade package catering to your needs, but its worth a try to search for it!


----------



## mediator (Apr 16, 2007)

Also check this!


----------



## mehulved (Apr 16, 2007)

So, for storing all that you'd require mysql or postgresql, so yeah xampp might be a better idea. I guess you'd find some tutorial on the net on how to do it.
Here's something that might cater to what you like *www.corvalis.net/address/ then *sourceforge.net/projects/php-addressbook/


----------



## aditya.shevade (Apr 17, 2007)

Thanks guys. Will check them out.... but now, I gotta run....

@ Kalpik... yeah... I want to learn php... but I have my orals going on and then semester exams... plus some other things..... haven't got time ......


----------



## Pathik (Apr 17, 2007)

arey yaar tyf it s jus for testing thats y he s keeping it 777 at first.. Btw once the server is setup he can change it to 755 or something appropriate


----------



## aditya.shevade (Apr 17, 2007)

^^ Yeah, and by the way, I found this S/W (php script) to be the best suited for what I am doing. The Address Book.

Aditya

One more thing..... I tried the sites given for dynamic DNS..... None worked..... What I have in mind is, can I mask my IP address to something and use that to redirect to my site? Like proxy?


----------



## Zeeshan Quireshi (Apr 17, 2007)

man , u wanted Web-Based File Management , so this is the link to one of the best PHP based file managers out there , bytehoard

*www.bytehoard.org 

and if u wanna build that kinda system n don't find ny script , PM me i'll help u set it up with Drupal

*www.drupal.org


----------



## Pathik (Apr 17, 2007)

if b want a whole cms than try joomla.. I like it better than drupal


----------



## mehulved (Apr 17, 2007)

Zeeshan Quireshi said:
			
		

> and if u wanna build that kinda system n don't find ny script , PM me i'll help u set it up with Drupal
> 
> *www.drupal.org


 That will be a total overkill, he just needs a file manager and andress book.



			
				aditya.shevade said:
			
		

> One more thing..... I tried the sites given for dynamic DNS..... None worked..... What I have in mind is, can I mask my IP address to something and use that to redirect to my site? Like proxy?


 What do you mean by that? What didn't work? They work for so many people.


----------



## aditya.shevade (Apr 17, 2007)

^^ By that I mean is, whenever I try to open the site, the admin screen of broadband modem (huiwai or something, MT841) is opened. I tried giving all possible paths, but nothing works. 

I have made a directory named website under htdocs in xampp. Whenever I type "ip address/website", I can see the site.

In no-ip, I added the host with my static IP address (address was detected by default) then, I selected port 80 redirect. I gave the port number 80 (If there is a way to see if the port is correct, then tell me).

Now, with no-ip, I got domain name adityashevade.myftp.org , but if I type that, I am asked for the broadband modem username and password. If I type adityashevade.myftp.org/website 404 error is there. Even in case of adityashevade.myftp.org/website/index.html the same 404 error is there. So what should I do?

Aditya


----------



## Pathik (Apr 18, 2007)

does ur broadband service give u a shared ip?


----------



## aditya.shevade (Apr 18, 2007)

^^ Shared IP??? Means?


----------



## mehulved (Apr 18, 2007)

aditya you definitely have a dynamic IP, just checked up your IP's.
So, what is happening is that the domain is pointing to port 80 of your router, you need to forward traffic from port 80 of your router to port 80 of your computer.
Try this,
1. log in to your router
2. Navigate to advanced => NAT => Nat Entries
3. Click on new
4. Go to NAPT properties, and type
Status - enabled
Private IP - 
Inside port - 80
Host Name - MyFTP(it can be anything but it's nice  to keep something that can be understood later on)
Protocol Type - TCP
Port - 80
Apply

Similarly, also open port 21 for TCP.

Check *www.portforward.com/english/routers/port_forwarding/Huawei/Smartax-MT-841/FTP.htm


----------



## aditya.shevade (Apr 18, 2007)

^^ What should I enter for Inside IP (I think you have written private, but it says inside here). I think it isthe static IP address... So what should I do? I think, I have to find static IP, then in network configuration, instead of letting DHCP choose the IP, I have to give a static IP. What is the exact procedure?

And how to open port 21? Should I do the same procedure with different hostname and port number 21?

Aditya


----------



## mehulved (Apr 18, 2007)

Well it says don't enter anything for inside IP, so just try that.
For port 21 see the link I have given and follow it step by step, it's for opening port 21 only. Port 21 is for listening to ftp server.


----------



## Zeeshan Quireshi (Apr 18, 2007)

i thing u should enable both TCP and UDP for ports 21 and 80 although it's not necessarily needed .

also u could open up port 23 if ur planning on setting up a mail server .


----------



## aditya.shevade (Apr 18, 2007)

^^ How to setup a static IP address? The site has instructions for Windows and OS-X. Nothing for Linux.

Aditya

^^ One more thing. I signed up for no-ip. Can someone please tell me what kind of host should I add? DNS host, port forward? I think port forward, but for that you need static IP address na? I am confused.


----------

