Difference between revisions of "Web Hosting"

From Wiki | LUG@UCLA
Jump to: navigation, search
Line 1: Line 1:
As a member of LUG@UCLA, you have been given an account on this server, and apache will serve your <tt>~/public_html/</tt> directory at [{{SERVER}}/~user/ {{SERVER}}/'''~user'''/] (replace "user" with your LUG username). Use your web space for whatever you want, but keep in mind that whatever you put up represents the LUG too. Just try not to get us in trouble!
+
As a member of LUG@UCLA, you have been given an account on this server, and apache will serve your <tt>~/public_html/</tt> directory at [{{SERVER}}/~user/ {{SERVER}}/~'''user'''/] (replace "user" with your LUG username). Use your web space for whatever you want, but keep in mind that whatever you put up represents the LUG too. Just try not to get us in trouble!
  
 
Here are some ideas for things to host:
 
Here are some ideas for things to host:
Line 35: Line 35:
 
  $ cp /etc/gitweb.conf gitweb_config.perl
 
  $ cp /etc/gitweb.conf gitweb_config.perl
  
Now edit <tt>'''gitweb_config.perl'''</tt> and change the following settings:
+
Now edit <tt>gitweb_config.perl</tt> and change the following settings:
  
 
* <code>$projectroot = "/home/'''user'''/public_html/repos/";</code>
 
* <code>$projectroot = "/home/'''user'''/public_html/repos/";</code>
 
* add this to the bottom: <code>@git_base_url_list = ("<nowiki>http://linux.ucla.edu/~</nowiki>'''user'''/repos");</code>
 
* add this to the bottom: <code>@git_base_url_list = ("<nowiki>http://linux.ucla.edu/~</nowiki>'''user'''/repos");</code>
  
Now you have Gitweb installed! View it at [http://linux.ucla.edu/~user/gitweb/ <nowiki>http://linux.ucla.edu/~</nowiki>'''user'''/gitweb/].
+
Now you have Gitweb installed! View it at [{{SERVER}}/~user/gitweb/ {{SERVER}}/~'''user'''/gitweb/].
  
 
== Noteworthy files/profiles from former LUGers ==
 
== Noteworthy files/profiles from former LUGers ==

Revision as of 00:03, 4 November 2013

As a member of LUG@UCLA, you have been given an account on this server, and apache will serve your ~/public_html/ directory at //linux.ucla.edu/~user/ (replace "user" with your LUG username). Use your web space for whatever you want, but keep in mind that whatever you put up represents the LUG too. Just try not to get us in trouble!

Here are some ideas for things to host:

  • your resume
  • your blog
  • your code (see a tutorial below)

[Tutorial] Hosting public Git repositories

Here at LUG@UCLA we like to share code. You can share yours by setting up bare git repositories and installing Gitweb into your public web space so anybody in the world can easily browse your code.

First we set up a repos directory in your web root:

$ mkdir ~/public_html/repos

Later you can add bare repositories under this directory. For demonstration, we'll add a test repository:

$ mkdir ~/public_html/repos/my_first_repo.git
$ cd ~/public_html/repos/my_first_repo.git
$ git init --bare
$ mv hooks/post-update.sample hooks/post-update

You should clone, pull, and push to this repository using SSH:

$ git clone user@ssh.linux.ucla.edu:public_html/repos/my_first_repo.git

Others can clone your repository using HTTP:

$ git clone http://linux.ucla.edu/~user/repos/my_first_repo.git

Now we will install Gitweb to make your repositories browseable, searchable, and beautiful, among other things:

$ cp -r /usr/share/gitweb ~/public_html/gitweb
$ cd ~/public_html/gitweb
$ cp /etc/gitweb.conf gitweb_config.perl

Now edit gitweb_config.perl and change the following settings:

  • $projectroot = "/home/user/public_html/repos/";
  • add this to the bottom: @git_base_url_list = ("http://linux.ucla.edu/~user/repos");

Now you have Gitweb installed! View it at //linux.ucla.edu/~user/gitweb/.

Noteworthy files/profiles from former LUGers