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
cern:website [2020/05/13 11:54] – [Copy to eos] iwncern:website [2023/09/29 17:29] (current) – [Personal CERN website] iwn
Line 1: Line 1:
- ====== Personal CERN website ======+ ======= Personal CERN website ======
 + 
 +You can make a personal website to share documents in your 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-manual.web.cern.ch/cernbox-manual/en/web/|this page]]. 
 ===== Setup ===== ===== Setup =====
 +
 +==== 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: 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:
Line 8: Line 19:
 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 19: 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 44: Line 55:
 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): 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 78:
  
 EOS is now mounted on PSI T3, so you mount with 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> <code bash>
 mkdir ~/eos mkdir ~/eos
-sshfs -o allow_other,reconnect ineuteli@lxplus.cern.ch:/eos/user/i/ineuteli/ ~/eos+sshfs -o allow_other,reconnect ineuteli@lxplus.cern.ch:/eos/user/${USER::1}/$USER/ ~/eos
 </code> </code>
 Make sure not to forget or add anymore trailing ''/''. Make sure not to forget or add anymore trailing ''/''.
Line 71: Line 91:
 fusermount -u ~/eos fusermount -u ~/eos
 </code> </code>
-You can put this alias in your ''.bashrc'':+<wrap tip>Pro tip</wrap> You can put this alias in your ''.bashrc'':
 <code bash> <code bash>
-alias meos='fusermount -u ~/eos && sshfs -o allow_other,reconnect $USER@lxplus.cern.ch:/eos/user/i/$USER/ ~/eos && echo "~/eos" && lt ~/eos'+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> </code>
  
cern/website.1589363666.txt.gz · Last modified: 2020/05/13 11:54 by iwn