Questions tagged [public-html]

141 questions
33
votes
11 answers

How to get the absolute path to the public_html folder?

$_SERVER['DOCUMENT_ROOT'] returns /usr/local/apache/htdocs/ is there a way to get /home/user/public_html/ The problem is that I have to write a script which can be in the public_html folder or a sub-folder of the public_html folder. The script…
Can't Tell
  • 12,714
  • 9
  • 63
  • 91
29
votes
3 answers

How can I make a public HTML folder in Ubuntu?

Simple question, but for some reason I couldn't find the exact answer on Google: I have a fresh Ubuntu install on Slicehost, and would like to make a public directory in my home dir for a simple website containing a bunch of static HTML files. How…
RexE
  • 17,085
  • 16
  • 58
  • 81
17
votes
2 answers

Recursively find files that are not publicly readable

I'd like to recursively find all files in my public_html folder that are not publicly readable (i.e. those files that will cause 403 error). Is there a quick bash command for that? I am using Linux servers running apache, if that is relevant.…
Ying Xiong
  • 4,578
  • 8
  • 33
  • 69
16
votes
2 answers

How do I use perlbrew to manage perl installations aimed at web applications?

I have been using perlbrew to manage multiple versions of perl on a Linux Fedora notebook. I have used it with great benefit to run command-line scripts mostly using App::cmd. I now want to move to running web applications written using…
Gurunandan Bhat
  • 3,544
  • 3
  • 31
  • 43
5
votes
4 answers

Cache Busting with Laravel

I've been developing a system and every time I update anything on the public folder, each computers must always clear their cache in order for it to take effect. I've only been coding directly on to the public folder for the js and css files. When I…
LEAD IT
  • 65
  • 2
  • 8
5
votes
2 answers

How to invoke a php file that is located outside public_html

Im creating a website and i am very OCD when it comes to security so i heard that if you store all of your .php files outside of your public_html folder and invoke them with another .php file that is inside your public_html folder then your risk of…
user1556495
4
votes
2 answers

How to properly set up SVN on web server?

I have found this question, but it was never resolved and don't want to hijack it for myself. I'll try and give as many details as possible. I have a shared hosting account on a Linux server which is my web server, and I have shell access. I'm…
Matt
  • 9,068
  • 12
  • 64
  • 84
3
votes
3 answers

Protecting folder in public_html

I have a music sharing site and realize that the files on my site are not necessarily protected as they are stored in a subfolder in public_html. I need to protect them in a way that they still work for anyone in the music player, which located on…
Eggo
  • 541
  • 7
  • 18
3
votes
2 answers

Is it unsafe to keep a Laravel project files inside public_html?

I have 3 different laravel projects inside public_html (that is, one level below) on a shared hosting. I changed each domain/subdomain document root path to point to the respective project/public folder (i.e.…
Jk33
  • 855
  • 3
  • 12
  • 28
3
votes
3 answers

How to properly create an SVN repository that is accessible via http? (inside public_html)?

Here's the situation: subversion is already installed in the server and I have access to one of the shared accounts in the server (not the root), and this shared hosting account has SSH access. I want to create a repository where I can commit the…
unknown
2
votes
2 answers

Feed file outside of public_html

I am having trouble uploading a file to the user from outside of "public_html" which is the folder that everyone has access to thru http. Ex. www.website.com/ everyhting after the / is public_html. I'm sure you all know what I'm referring to. So I…
Axel Latvala
  • 576
  • 3
  • 7
  • 21
2
votes
1 answer

How can I exclude an image from Hugo's public directory?

I'm using Hugo to generate a static site. I'm making use of Hugo's image functions to create different sized versions of the same image (160px, 240px, and 480px). That's all working fine but Hugo also makes the original image available (e.g.…
Matt
  • 9,068
  • 12
  • 64
  • 84
2
votes
1 answer

Upload a file to public_html folder

I have a joomla component that fetches the audio songs from the music folder on the server and plays them in the front end. And the users can upload their songs from the front end. But the problem is that, the component settings are such that the…
shasi kanth
  • 6,987
  • 24
  • 106
  • 158
2
votes
0 answers

Webpack: Favicon in public folder not working

I'm using React + Webpack. I'm currently trying to install a favicon but it's not working. I have this in my public/index.html file:
bigpotato
  • 26,262
  • 56
  • 178
  • 334
2
votes
1 answer

How .htaccess works for public_html cpanel

I have a Laravel project uploaded in root: home/user/my-project-directory and in public_html i have a directory some-directory-name. In this directory, I have a public Laravel directory. The part that I don't understand is, where should I have a…
Ioan Andrei
  • 93
  • 1
  • 16
1
2 3
9 10