:orphan: See also :ref:`imada-it`. .. _imada-www: IMADA Webserver for Employees ============================= The IMADA webserver primarily hosts personal websites (i.e., ``https://imada.sdu.dk/u/username``), but also certain employee-controlled websites under the IMADA domain, and websites with custom domains. Access ------ The webserver is accessible via SSH-based methods at ``imada-web.srv.sdu.dk``. .. note:: Your username may need to be prefixed with the domain, e.g., ``NAT-SDU\john`` instead of just ``john``. Note that if you type your username with domain on the command line, you probably need to escape the backslash. Thus, a full SSH command may be ``ssh NAT-SDU\\john@imada-web.srv.sdu.dk``. The servers are only accessible internally at SDU, e.g., being on the SDU network. This can be achieved either being physically at SDU or enabling the `SDU VPN `__. See also :ref:`imada-ssh-key`. .. note:: The permissions in the served files, in ``/srv/www/`` are in general done using ACL instead of simple permissions. Thus, when using ``ls`` you do not see the actual permissions. Use the ``getfacl`` command instead. File and Folder Permissions --------------------------- In order for the webserver to read and serve your files they need to have special permissions. These permissions are not the standard POSIX permissions, but instead ACL records. Thus, to view the full permissions you should use the ``getfacl`` command, and in order to set permissions there is the ``setfacl`` command. Usually the right permissions are automatically inheritet in the folders, but if you get a "Forbidden" error on a page you may need to set permissions manually on some files. To recursively set the right permissions on a folder, you can use the following command:: setfacl -R -m m:rX,u:www-data:rX Personal Websites ----------------- The files for your personal webpage should go into ``/srv/www/imada.sdu.dk/u//``. Your webpage is served at ``https://imada.sdu.dk/u/``. Additionally it is reachable at ``https://imada.sdu.dk/~``, from where the user is automatically redirected to ``https://imada.sdu.dk/u/``. Other Websites Under the IMADA Domain ------------------------------------- You can request a new website to be created under certain folders on the IMADA domain, e.g., for an event or a research project. For example, the site for CS colloquia is in this category (https://imada.sdu.dk/Events/CS_Colloquia/). The folders available can be seen on the server in ``/srv/www/``. To request a new site, contact servicedesk, which will create the folder and assign you permissions. Other Websites With a Custom Domain ----------------------------------- The server can host websites with a custom SDU subdomain (e.g., ``something.sdu.dk`` or ``somethingElse.imada.sdu.dk``). This could be a group or section website, or a website for a research project. If you want a website for, say, ``https://myProject.sdu.dk`` hosted on the IMADA webserver, you can contact servicedesk which will create a folder in ``/srv/www/`` (with the right permissions so you can modify it), create the domain, and point it to the folder. Password Protection with ``.htaccess`` and ``.htpasswd`` -------------------------------------------------------- While it is possible to create password-protected folders using ``.htaccess`` and ``.htpasswd`` files, SDU IT recommends not using it. The reason is that users viewing your page might have the password prompt blocked due to security considerations. For example, all SDU employees with managed Windows machines will not be able access such password protected pages.