User Tools

Site Tools


cern:website

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
cern:website [2018/06/06 09:22] – [Setup] iwncern:website [2023/09/28 16:22] – [Copy to eos] iwn
Line 1: Line 1:
- ====== Personal CERN website ======+ ======= Personal CERN website ======
 + 
 +You can make a personal website to share documents in your ''/afs'' or ''/eos'' directory via the World Wide Web. Please follow the instructions on [[https://cernbox-manual.web.cern.ch/cernbox-manual/en/web/|this page]]. 
 + 
 +The steps are basically: 
 +  - Create a ''/eos/user/${USER::1}/$USER/www'' directory on EOS (''lxplus''). 
 +  - Promote it to a website via CERNBox and CERN Web services. 
 +  - Configure access with ''.htaccess''
 +  - Configure each webpage with an index file (''index.html'' or ''index.php''). 
 +  - Add content.
  
-You can make a personal website to share documents in your ''/afs'' or ''/eos'' directory via the World Wide Web. Please follow the instructions on [[https://cernbox.web.cern.ch/cernbox/en/web/personal_website_content.html|this page]]. 
  
 ===== Setup ===== ===== Setup =====
  
-You need to configure access to CMS members as described [[https://espace.cern.ch/webservices-help/websitemanagement/ConfiguringAFSSites/Pages/AccesscontrolonAFSsites.aspx|here]] and [[http://linux.web.cern.ch/linux/scientific4/docs/shibboleth.shtml|here]]  with an Apache ''[[https://httpd.apache.org/docs/2.4/howto/htaccess.html|.htaccess]]'' file in you ''www'' folder:+==== Setup access ==== 
 + 
 +You need to configure access to CMS members as described [[https://espace.cern.ch/webservices-help/websitemanagement/ConfiguringAFSSites/Pages/AccesscontrolonAFSsites.aspx|here]] with an Apache ''[[https://httpd.apache.org/docs/2.4/howto/htaccess.html|.htaccess]]'' file in you ''www'' folder:
 <file bash .htaccess> <file bash .htaccess>
 SSLRequireSSL # The modules only work using HTTPS SSLRequireSSL # The modules only work using HTTPS
  
-AuthType shibboleth +AuthType openid-connect 
-ShibRequireSession On +  Require valid-user 
-ShibRequireAll On +AuthType openid-connect 
-ShibExportAssertion Off +Require claim cern_roles:view-site-root
-Require valid-user +
-Require ADFS_GROUP cms-physics-access+
  
 Options +Indexes Options +Indexes
Line 20: Line 28:
  
 Other AD FS groups can be found in CERN's [[https://e-groups.cern.ch/e-groups/EgroupsSearch.do|E-groups]]. Other AD FS groups can be found in CERN's [[https://e-groups.cern.ch/e-groups/EgroupsSearch.do|E-groups]].
 +
 +==== Setup index ====
  
 If you want to display documents and directories in a custom style (in particular plots), you can add an ''index.html'' or ''index.php'' file, for example [[cern:index|this one]]. If you want to display documents and directories in a custom style (in particular plots), you can add an ''index.html'' or ''index.php'' file, for example [[cern:index|this one]].
Line 43: Line 53:
 </Files> </Files>
 </code> </code>
-In this way ''.log'' files accessible on your website will be opened as a plain ASCII text file in the browser, instead of being downloaded. More content types ("MIME types") can be found [[https://www.lifewire.com/file-extensions-and-mime-types-3469109|here]]. To configure multiple extensions in the same way:+In this way ''.log'' files accessible on your website will be opened as a plain ASCII text file in the browser, instead of being downloaded. More content types ("MIME types") can be found [[https://www.lifewire.com/file-extensions-and-mime-types-3469109|here]]. To configure multiple extensions in the same way (''?i:'' is for case-insensitivity):
 <code> <code>
-<FilesMatch "\.(?i:log|py|sh)$">+<FilesMatch "\.(?i:log|py|sh|tex)$">
   ForceType text/plain   ForceType text/plain
   Header set Content-Type "text/plain"   Header set Content-Type "text/plain"
 </FilesMatch> </FilesMatch>
 +
 +<Files *.rtf>
 +  ForceType text/rtf
 +  Header set Content-Type "text/rtf"
 +</Files>
 </code> </code>
  
Line 62: Line 77:
 ===== Copy to eos ===== ===== Copy to eos =====
  
-Use secure copy ''scp'' to copy stuff from your local computer or from PSI T3 to your ''/eos'':+EOS is now mounted on PSI T3, so you mount with 
 +<code bash> 
 +kinit $USER@CERN.CH && eosfusebind -g krb5 $HOME/krb5cc_$UID 
 +</code> 
 +or (outdated) 
 +<code bash> 
 +mkdir ~/eos 
 +sshfs -o allow_other,reconnect ineuteli@lxplus.cern.ch:/eos/user/${USER::1}/$USER/ ~/eos 
 +</code> 
 +Make sure not to forget or add anymore trailing ''/''
 +With each new session, you can remount using 
 +<code bash> 
 +fusermount -u ~/eos 
 +</code> 
 +<wrap tip>Pro tip</wrap> You can put this alias in your ''.bashrc'': 
 +<code bash> 
 +alias meos='fusermount -u ~/eos && sshfs -o allow_other,reconnect $USER@lxplus.cern.ch:/eos/user/${USER::1}/$USER/ ~/eos && echo "~/eos" && lt ~/eos' 
 +</code> 
 + 
 +Alternatively, use secure copy ''scp'' to copy stuff from your local computer or from PSI T3 to your ''/eos'':
 <code bash> <code bash>
 scp test.txt <user>@lxplus.cern.ch:/eos/user/<letter>/<user>/www/ scp test.txt <user>@lxplus.cern.ch:/eos/user/<letter>/<user>/www/
 </code> </code>
  
-It is also possible to mount your personal ''/eos'' directory to your local computer with an [[https://cernbox.cern.ch/cernbox/doc/clients.html|CERN Box desktop app]] ([[https://cds.cern.ch/record/2288368|video tutorial]]). +It is also possible to mount your personal ''/eos'' directory to your local computer with an [[https://cernbox.cern.ch/cernbox/doc/clients.html|CERN Box desktop app]] ([[https://cds.cern.ch/record/2288368|video tutorial]]).
cern/website.txt · Last modified: 2023/09/29 17:29 by iwn