Jump to content

Can't get href to provide a working download link for .run files

LloydLynx
Go to solution Solved by mariushm,

You can define the mimetype or say it's binary from the httpd.conf 

Something like    

AddType application/octet-stream	run

I think I used tabs above but could be only spaces work, though I think apache accepts both as separators..   also application/octet-stream is generic for executables, there may be a proper mime type for  linux binary / run file ... just doesn't pop up at a quick google search

 

See  https://webplatform.github.io/docs/tutorials/configuring_mimetypes_on_the_server/

 

 

<a href="heaven/Unigine_Heaven-4.0.run" download><font color="blue">Linux</font></a><br>
<a href="heaven/Unigine_Heaven-4.0.dmg" download><font color="blue">Mac OS X (intel)</font></a><br>
<a href="heaven/Unigine_Heaven-4.0.exe" download><font color="blue">Windows</font></a><br>

I used to use python SimpleHTTPServer to host my website, but it was really shotty, so I started using Apache(on Debian). The .dmg and .exe downloads work perfectly, but the .run link just opens it as plain text in the browser. This problem didn't exist when I was using SimpleHTTPServer. I don't know where to go from here, the file names and paths are all correct, and I don't see anything else wrong.

lumpy chunks

 

Expand to help Bunny reach world domination

(\__/)
(='.'=) This is Bunny. Copy Bunny into your signature to
(")_(") help him on his way to world domination.

 -Rakshit Jain

Link to comment
Share on other sites

Link to post
Share on other sites

You'd get better results by posting this to ServerFault or SuperUser instead.

As for your question, you need to configure the MIME type for .run files in your apache config.

Link to comment
Share on other sites

Link to post
Share on other sites

You can define the mimetype or say it's binary from the httpd.conf 

Something like    

AddType application/octet-stream	run

I think I used tabs above but could be only spaces work, though I think apache accepts both as separators..   also application/octet-stream is generic for executables, there may be a proper mime type for  linux binary / run file ... just doesn't pop up at a quick google search

 

See  https://webplatform.github.io/docs/tutorials/configuring_mimetypes_on_the_server/

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

7 hours ago, mariushm said:

You can define the mimetype or say it's binary from the httpd.conf 

Something like    


AddType application/octet-stream	run

I think I used tabs above but could be only spaces work, though I think apache accepts both as separators..   also application/octet-stream is generic for executables, there may be a proper mime type for  linux binary / run file ... just doesn't pop up at a quick google search

 

See  https://webplatform.github.io/docs/tutorials/configuring_mimetypes_on_the_server/

 

 

Thank you so much! Run files are downloadable now.

And for future reference, you'll have to create the httpd.conf file inside /etc/apache2/ instead of what that website says, and of course restart the apache2 systemd service for the new mimetype to take effect.

lumpy chunks

 

Expand to help Bunny reach world domination

(\__/)
(='.'=) This is Bunny. Copy Bunny into your signature to
(")_(") help him on his way to world domination.

 -Rakshit Jain

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×