Difference between revisions of "Secure App Access"

From Amahi Wiki
Jump to: navigation, search
Line 6: Line 6:
 
This is an example of how to force an app access via https.  For this example, AjaXplorer will be used but this will work with any app.
 
This is an example of how to force an app access via https.  For this example, AjaXplorer will be used but this will work with any app.
  
* Go to you config file for apache, '''cd /etc/httpd/conf/'''
+
* Go to you config file for apache:
* Now it is time to create a key and a crt. '''openssl genrsa -out filename.key 1024''' then '''openssl req -new -key filename.key -x509 -days 1000 -out filename.crt''' It will ask you a few questions, just make sure that the '''Common Name''' is the domain name.
+
{{Code|cd /etc/httpd/conf}}
* Next open up httpd.conf with you favorite editor and add '''NameVirtualHost *:443''' somewhere in the conf file
+
* Now it is time to create a key and a crt.   It will ask you a few questions, just make sure that the '''Common Name''' is the domain name:
* Open terminal and do '''yum -y install mod_ssl''' which is needed by apache to make this work.
+
{{code|openssl genrsa -out filename.key 1024
* Now go to '''cd /etc/httpd/conf.d/''' and find the file that has ajaxplorer in its name. You can type '''ls''' to list the files. And open it up with a text editor
+
openssl req -new -key filename.key -x509 -days 1000 -out filename.crt}}
 +
* Next open up httpd.conf with you favorite editor and add the following to the end:
 +
{{Text|NameVirtualHost *:443}}
 +
* Open terminal and do (needed by apache to make this work):
 +
{{Code|yum -y install mod_ssl}}
 +
* Find the file that has ajaxplorer in its name:
 +
{{Code|cd /etc/httpd/conf.d/}} 
 
* Edit it to like this:
 
* Edit it to like this:
<pre>
+
{{Code|<pre>
 
     <VirtualHost *:443>
 
     <VirtualHost *:443>
 
         ServerName ajaxplorer
 
         ServerName ajaxplorer
Line 31: Line 37:
  
 
     </VirtualHost>
 
     </VirtualHost>
  </pre>
+
  </pre>}}
 
*  Finaly create a file called 1026-ajaxplorerhttp.conf (note that the number may change for you) and put in this (also change things like the website name and etc):
 
*  Finaly create a file called 1026-ajaxplorerhttp.conf (note that the number may change for you) and put in this (also change things like the website name and etc):
<pre>
+
{{Code|<pre>
 
     <VirtualHost *:80>
 
     <VirtualHost *:80>
 
         ServerName username.yourhda.com
 
         ServerName username.yourhda.com
Line 45: Line 51:
  
 
     </VirtualHost>
 
     </VirtualHost>
</pre>
+
</pre>}}
 +
 
 +
* Now you need to restart apache:
 +
{{Code|service httpd restart}}
  
 
And that's all, you now have 128 bit encryption for ajaxplorer.
 
And that's all, you now have 128 bit encryption for ajaxplorer.

Revision as of 03:15, 9 August 2011

Warning.png WARNING
This is recommended only for advanced users, proceed with caution.


This is an example of how to force an app access via https. For this example, AjaXplorer will be used but this will work with any app.

  • Go to you config file for apache:
bash code
​cd /etc/httpd/conf​
  • Now it is time to create a key and a crt. It will ask you a few questions, just make sure that the Common Name is the domain name:
bash code
​openssl genrsa -out filename.key 1024 openssl req -new -key filename.key -x509 -days 1000 -out filename.crt​
  • Next open up httpd.conf with you favorite editor and add the following to the end:
Text
​NameVirtualHost *:443​
  • Open terminal and do (needed by apache to make this work):
bash code
​yum -y install mod_ssl​
  • Find the file that has ajaxplorer in its name:
bash code
​cd /etc/httpd/conf.d/​
  • Edit it to like this:
bash code
​'"`UNIQ--pre-00000005-QINU`"'​
  • Finaly create a file called 1026-ajaxplorerhttp.conf (note that the number may change for you) and put in this (also change things like the website name and etc):
bash code
​'"`UNIQ--pre-00000007-QINU`"'​


  • Now you need to restart apache:
bash code
​service httpd restart​


And that's all, you now have 128 bit encryption for ajaxplorer.

See also

Access HDA over SSL