Hide directories containg source code

35 views
Skip to first unread message

Mohammed Tanveer

unread,
Jan 23, 2018, 1:04:53 PM1/23/18
to gce-discussion
Hi,

I would like to know how can i hide directories which contains my websites source code files and other folders. For example, i have a directory "images/" which contains all the images uploaded on my site and i want to hide "images/" folder from users accessing images/ directory folder on my site example.com/images/ and example.com/elements example.com/assets/

In whm/cpanel by default, all these types of directories are hidden so we don't need to do anything, so kindly let me know can i achieve this in google cloud compute engine.

Thanks
images.png

Dinesh (Google Platform Support)

unread,
Jan 23, 2018, 6:41:11 PM1/23/18
to gce-discussion

Hello Mohammed,


Can you please elaborate, how you have deployed your website on GCE? Are you using WordPress - Google click to deploy the solution to host your website on GCE?


Meanwhile, you may want to try the recommendations provided in these stack articles[1][2][3] about hiding the source code.



[1]:https://stackoverflow.com/questions/14230411/how-to-hide-wordpress-details-from-view-source-code

[2]: https://stackoverflow.com/questions/12543704/how-to-hide-my-source-code-so-to-not-be-copied

[3]:https://stackoverflow.com/questions/214886/how-do-i-hide-directories-in-apache-specifically-source-contro

Mohammed Tanveer

unread,
Jan 24, 2018, 9:05:51 AM1/24/18
to gce-discussion
Hi,

Its not the WordPress, I have built my web app using PHP CodeIgniter. I have the same source code uploading for testing purpose on my Hostgator server which has cpanel and i don't need to do anything, by default access to the folders like /images /assets /public is not viewable for any user.

I checked with StackOverflow but i don't find any solution for Google cloud compute engine. Kindly let me know how to fix this.

Thanks

Dinesh (Google Platform Support)

unread,
Jan 24, 2018, 7:16:27 PM1/24/18
to gce-discussion

You may want to try Plesk Onyx on CentOS 7 WebHost Edition to host your website on GCE. Plesk is the leading WebOps platform to build, secure, and run websites and applications. It includes a control panel with an intuitive interface along with a complete set of security tools and features to protect your websites.


I understand you are looking for a similar solution on GCE as you already have with Hostgator server along with cpanel. Please let me know if I misunderstood and you looking something else.


You can find detailed information about Google cloud launcher in this documentation[1].


I hope this resolves your query?


 
[1]:https://cloud.google.com/launcher/

Reply all
Reply to author
Forward
0 new messages