Question
What is the php path for an Ubuntu 14.04 droplet?
Good day everyone,
I was wondering if you could tell me how I could make this line work in my htaccess (both versions):
ErrorDocument 404 /apps/{NAME}/public/404.php
ErrorDocument 404 /404.php
Basically the 404 is in my /public folder (root directory) and that’s what I’d like to link to in the .htaccess. I’ve tried searching the topics here and I can’t figure out what exactly I’m asking for. The “php path” sounds like the best bet? Lol. ;-)
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
I just realized this may be a question for serverpilot…if it is let me know and I’ll shuffle the question over to that website…sorry!
What does
ps aux | grep php
yield?@Rockeer
I can’t seem to copy and paste from the terminal. (LOL! Learning.) :)
master process is showing (/etc/php5.4-sp/fpm.conf)
then near the bottom it says pool {droplet name}
This appears to be a part of serverpilot’s features. I’ll go ahead and ask the question over there. I apologize. I’m brand spankin’ new to VPS’s (from CPanel after 6 years lol.)
@GreenKi If you are using putty you copy by selecting text and right clicking (its a bit clunky is it also pastes but it works ^_^) if you are using OSX, you can copy from standard output with cmd+c, and in Linux its CTRL + C :)
Now, what are you using, I am guessing Apache2?
If its apache, can’t help you there (I am an nginx user), you will probably have to add the folder and listen for php files in apaches “sites-available” config.
@GreenKi You will be happy you made the swap, VPS is a bit harder but gives you a lot more control which is better in the end :)
@Rockeer I was referencing the DO’s terminal session (that link they give us on the site here.) Sorry! I’m at campus right now we’re really only allowed web interfaces and MS Office products.
I’ll try that php info statement and maybe that will get me the directory I need.
@Rockeer I found something. I wonder if this is it (from php info page)
That doesn’t work nor /404.php. hrm.
@GreenKi Yeah… I don’t use that, half the things don’t work for me there :/
The way I got it is that you want to reference to the 404 page to display on your web page that is located at /apps/{NAME}/public/404.php. If this is what you need we will have to find out which web server you use, there are 2 standards: nginx and apache2. Try
ps aux | grep apache
and see if it gives any output, if it doesn’t you are using nginx. Just to make it more clean this is a section of my nginx server config to show you the 404 page reference:If you are using apache this will have to be modified to fit your purpose. Don’t try to insert this code in your files.
I don’t know why I didn’t say it earlier, sorry. I’m using Apache2.