LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   web server (https://www.linuxquestions.org/questions/linux-server-73/web-server-882871/)

Shao Lung 05-26-2011 11:57 AM

web server
 
I decided im going to set up my slackware 13.1 32bit p4 as a web server host for a few friends. I want their webpage to be cgi enabled. Since I am hosting for many sites do i have to modify the httpd.conf regarding directory root?

I have made an account called www and am currently hosting a test page there,,,as well as set /home/www as directory root in httpd.conf. I think im on the right track but I could use some help from experts

Thanks in advance.

Zetec 05-27-2011 12:37 AM

Are these separate websites with different url's? If so, you will need to look at Apache Virtual Hosting.

Noway2 05-27-2011 05:52 AM

Zetec has the right idea. To expand upon that, you could create a vhost for each user and point the document root to somewhere in their /home directories. This way you can maintain isolation between the user's and everybody has their own page while the root web system remains available for system wide functions. Using this approach the default URL would be http://<your-domain>/user. The other answer would be for each user to obtain the own domain, in which case you can name the vhost according to their domain and just point to the document root.

Shao Lung 05-27-2011 02:04 PM

Noway2::
what your saying is i make standard linux acount for these people, then place their webpage root as their home directory? Do I have to modify the httpd.conf file, and put a driectory root for each one? Or do I set it up with virtual host, and put each virtual host in the httpd.conf?
for example Dave wants a webpage, make dave an account /home/dave and have /home/dave/www as his web page root? And how about attatching CGI? Can I automate setting up virtual hosts in the httpd.conf file or do I have to manually set it up?

Is it possible to set up a webpage host , where you go to your webpage but no body else can see it? That being asked, is it also possible to make a public version of this webpage they want to display? Basically 2 web pages one for private viewing and one for public viewing,,, with out some of the private "applications" ?

I know I will have a lot of questions about this, but im obsessed with making this work, and I always appreciate any and all help to get this little server running.

lithos 05-27-2011 03:41 PM

Hi,

you might want to check Install the Apache 2 Web Server or Setting up an SSL secured Webserver

Noway2 05-27-2011 05:10 PM

If I recall correctly, slackware has a vhost configuration file. You should look at that for setting up a vhost. You are correct that you would set up, for example, /home/dave/www for Dave's web page document root. The permissions might get a little tricky for keeping others from reading the directory. Apache needs read access, which is usually associated with others. You could put Apache in each of the user's groups and give group read access on the www folder. You would probably want to remove group write and execute access however to prevent Apache from executing and modifying files. I am not sure what you mean by attaching CGI. To be honest, I have always written html and PHP pages and haven't needed "cgi".

Your users can use the .htaccess to assign passwords and users to their sites to protect them. If you want, you can give each one an SSL site, but the certificates would be an issue by "official" standards. Normally it is one cert per ip address, though recently SNI which identifies the vhost is becoming more accepted. You could give everyone a certificate that has been signed by your web server and they can use that to provide certificate authentication - about as secure for access as you can get.

chrism01 05-29-2011 11:54 PM

Actually, CGI is Common Gateway Interface https://secure.wikimedia.org/wikiped...eway_Interface ie any time you have a 'dynamically generated' or 'interactive' web page ie not flat text (html, pdf etc) then that IS using the CGI protcol, so if you've used PHP, you have used CGI ;)

Shao Lung 05-30-2011 06:53 PM

Quote:

Originally Posted by chrism01 (Post 4370656)
Actually, CGI is Common Gateway Interface https://secure.wikimedia.org/wikiped...eway_Interface ie any time you have a 'dynamically generated' or 'interactive' web page ie not flat text (html, pdf etc) then that IS using the CGI protcol, so if you've used PHP, you have used CGI ;)

So what your saying here is those site hosts like my space , where, as a client you can manipulate your web page, set up your background move notes/memos, attach you tube links etc, thats all cgi ???


All times are GMT -5. The time now is 01:36 AM.