index.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <html>
  2. <head>
  3. <title> Cloudron LAMP app </title>
  4. <style>
  5. body {
  6. width: 50%;
  7. min-width: 640px;
  8. margin: auto;
  9. font-family: Helvetica;
  10. color: #333;
  11. }
  12. pre {
  13. font-family: monospace;
  14. background: #333;
  15. color: white;
  16. border: none;
  17. width: 99%;
  18. padding: 10px;
  19. text-align: left;
  20. font-size: 13px;
  21. border-radius: 5px;
  22. margin-bottom: 15px;
  23. box-shadow: 0px 1px 12px rgba(0, 0, 0, 0.176);
  24. }
  25. h1 {
  26. text-align: center;
  27. }
  28. .center > table {
  29. width: 100%;
  30. }
  31. .h, .e {
  32. background-color: white !important;
  33. }
  34. </style>
  35. </head>
  36. <body>
  37. <h1>Cloudron LAMP App</h1>
  38. <br/>
  39. <h2>MySQL credentials</h2>
  40. <p>Use the following environment variables in the PHP code to access MySQL:</p>
  41. <pre>
  42. getenv("MYSQL_HOST")
  43. getenv("MYSQL_PORT")
  44. getenv("MYSQL_USERNAME")
  45. getenv("MYSQL_PASSWORD")
  46. getenv("MYSQL_DATABASE")
  47. </pre>
  48. <br/>
  49. <h2>SFTP Transfer</h2>
  50. <p>
  51. You can SFTP files to the <b>public</b> folder using <a href="https://cyberduck.io/" target="_blank">Cyberduck</a>,
  52. <a href="https://filezilla-project.org/" target="_blank">FileZilla</a> or <a href="https://www.gftp.org/" target="_blank">gFTP</a>
  53. (use your cloudron credentials to authenticate).
  54. </p>
  55. <p>
  56. We recommend disabling SFTP access (from Cloudron's configuration panel) once you have uploaded your code.
  57. </p>
  58. <pre>
  59. sftp -P 2222 surfer.nebulon.info:public/
  60. </pre>
  61. <br/>
  62. <h2>phpMyAdmin access</h2>
  63. <p>
  64. You can access phpMyAdmin using your Cloudron credentials <a href="/phpmyadmin" target="_blank">here</a>.
  65. </p>
  66. <p>
  67. Note that disabling SFTP access also disables phpMyAdmin.
  68. </p>
  69. <br/>
  70. <h2>Cron</h2>
  71. <p>
  72. Just put a file called crontab to the directory /app/data and it will picked up automatically. It has to be in the cron syntax without username.
  73. </p>
  74. <p>
  75. Commands are executed as the user www-data.
  76. </p>
  77. <br/>
  78. <h2>Logs</h2>
  79. <p>Apache logs can be viewed using the <a href="https://cloudron.io/references/cli.html" target="_blank">cloudron commandline tool</a>.</p>
  80. <pre>
  81. cloudron logs -f
  82. </pre>
  83. <br/>
  84. <h2>Addons</h2>
  85. <p>The app is configured to have access to the following Cloudron addons:</p>
  86. <ul>
  87. <li><a href="https://cloudron.io/references/addons.html#mysql" target="_blank">mysql</a></li>
  88. <li><a href="https://cloudron.io/references/addons.html#localstorage" target="_blank">localstorage</a></li>
  89. <li><a href="https://cloudron.io/references/addons.html#sendmail" target="_blank">sendmail</a></li>
  90. <li><a href="https://cloudron.io/references/addons.html#redis" target="_blank">redis</a></li>
  91. <li><a href="https://cloudron.io/references/addons.html#ldap" target="_blank">ldap</a></li>
  92. <li><a href="https://cloudron.io/references/addons.html#oauth" target="_blank">oauth</a></li>
  93. </ul>
  94. <p>Read more about Cloudron addons and how to use them <a href="https://cloudron.io/references/addons.html" target="_blank">here</a>.</p>
  95. <br/>
  96. <h2>PHP Setup</h2>
  97. <?php
  98. echo phpInfo();
  99. ?>
  100. </body>
  101. </html>