Jump to content

Is It Allowed To Use More Than One Folder Having .htaccess.


Recommended Posts

While trying python + Django, I kind of think that krydos might be using more than one folder level configurations.

 

for example.

 

http://krydos.heliohost.org/ ---> don't know which technology he is using.

 

https://krydos.heliohost.org/djangotest/ ---> Django

 

https://krydos.heliohost.org/cgi-bin/modules36.py ---> cgi (I don't know what is that and how to do)

 

 

so I tried from the tutorial in django wik (and edited it) and come to know that I can configure more than one django projects on heliohost.

 

I it ok to do that for normal user?

 

I have no plans to have thousands but one for root level and couple inside.

Link to comment
Share on other sites

http://krydos.heliohost.org/ ---> don't know which technology he is using.

HTML with the word 'Blank.' in index.html.

 

Yep.

 

https://krydos.heliohost.org/cgi-bin/modules36.py ---> cgi (I don't know what is that and how to do)

CGI is really easy. Here's a simple example:

#!/usr/bin/python3.6
print("Content-Type: text/html\n\n")
print("HelioHost rules!")
The first line says which language the rest of the code is written in. The second line sets the headers so a browser can understand the data that is being sent. The third line is just a simple print comnmand, but since this is cgi the output goes to a browser instead of the command line.

 

If you're curious here's the actual code for https://krydos.heliohost.org/cgi-bin/modules36.py

#!/usr/bin/python3.6

print("Content-Type: text/html\n\n")

import pip
installed_packages = pip.get_installed_distributions()
installed_packages_list = sorted(["<td>%s</td><td>%s</td>" % (i.key, i.version) for i in installed_packages])
print("Tommy /usr/bin/python3.6 installed modules:<br><br>")
print("<table><tr><th align='left'>Module</th><th align='left'>Version</th></tr>")
print("</tr><tr>".join(installed_packages_list))
print("</tr></table>")
It just shows all of the modules that have been installed with pip. It doesn't show the default modules that came with python though.
  • Like 1
Link to comment
Share on other sites

https://krydos.heliohost.org/cgi-bin/modules36.py ---> cgi (I don't know what is that and how to do)

CGI is really easy. Here's a simple example:

#!/usr/bin/python3.6
print("Content-Type: text/html\n\n")
print("HelioHost rules!")

 

 

Is there any server configuration required? I made demo.py in cgi-bin but it says internal server error while visiting patents.heliohost.org/cgi-bin/demo.py.

Edited by patents
Link to comment
Share on other sites

Your file has dos line endings. It's running on linux so it needs linux line endings. The easiest way to do this is to go to file manager in cpanel, create a new file, and copy/paste the code in. The default settings in file manager will work on linux. Another option is you could download an editor like notepad++ that is capable of writing files with the proper line endings.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...