This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Access PHP file directly via http & IP address
#1
[Not Solved] Access PHP file directly via http & IP address
I want to upload a private PHP file to common folder - public_html; basically I don't want to upload to any website

And I want to access this file via browser in http, may tell me there's any solution?

Like, when I enter IP into address bar of browser, php file will be run & processed


PHP Code:
http://xx.xx.xx.xx/public_html/some.php 


Regards

There's a solution at https://github.com/sentora/sentora-core/...-150398764

Followed guide, may access to TXT files, but error 500 with PHP files

May you tell me?
Reply
Thanks given by:
#2
[Not Solved] RE: Access PHP file directly via http & IP address
(11-13-2018, 05:54 PM)7rdoq Wrote: I want to upload a private PHP file to common folder - public_html; basically I don't want to upload to any website

And I want to access this file via browser in http, may tell me there's any solution?

Like, when I enter IP into address bar of browser, php file will be run & processed


PHP Code:
http://xx.xx.xx.xx/public_html/some.php 


Regards

There's a solution at https://github.com/sentora/sentora-core/...-150398764

Followed guide, may access to TXT files, but error 500 with PHP files

May you tell me?

The private way I would do it is is by creating a virtualhost pointing to my local domain TLD.
(Note for below: you can also point the DocumentRoot to a Sentora managed domain path)

Example:
Code:
<VirtualHost *:80>
 
ServerAdmin admin@testing.local
ServerName  testing.local
DocumentRoot /var/www/html/testing.local
 
ErrorLog ${APACHE_LOG_DIR}/testing.local_error.log
CustomLog ${APACHE_LOG_DIR}/testing.local_access.log combined
 
</VirtualHost>

Either add the system to your local domain DNS zones or edit your hosts file from the client system you wish to access the testing :

Linux as root/sudo
Code:
/etc/hosts[code]

Windows in notepad as Administrator: (first right-click notepad, run as Administrator, then open:
[code]C:\Windows\System32\Drivers\etc\hosts

Mac OSX as root/su
Code:
/private/etc/hosts

Add your server to hosts file:
Code:
192.168.1.200            testing.local

Now your systems within the local domain (if added to DNS zones) or with modified hosts file will reach your server by accessing
Code:
http://testing.local
Reply
Thanks given by:
#3
[Not Solved] RE: Access PHP file directly via http & IP address
(11-13-2018, 05:54 PM)7rdoq Wrote: I want to upload a private PHP file to common folder - public_html; basically I don't want to upload to any website

And I want to access this file via browser in http, may tell me there's any solution?

Like, when I enter IP into address bar of browser, php file will be run & processed


PHP Code:
http://xx.xx.xx.xx/public_html/some.php 


Regards

There's a solution at https://github.com/sentora/sentora-core/...-150398764

Followed guide, may access to TXT files, but error 500 with PHP files

May you tell me?

Or, create a 'fake' domain for the user you want to do this with (so it creates the hosting space inside Sentora) and then follow this tutorial:
http://forums.sentora.org/showthread.php?tid=932
If done properly, anybody can use the DNS-Less preview to view their site or files without a domain.
-TGates - Head of Support

SEARCH the Forums or read the DOCUMENTATION before posting!
Modules Maintained: 13 - Module Installs: 108k+

Find my support or modules helpful? Donate HERE
Get your domains using my affiliate link:
GoDaddy - Domains
Reply
Thanks given by:


Possibly Related Threads...
Thread Author Replies Views Last Post
Having both HTTP & HTTPS (Port 443 and Port 80) sites on a server dsmarter 12 12,313 11-22-2019, 11:40 PM
Last Post: rahmatalimalik5
How to give the cliens file manager access to their respective domain directory vsvinit0 4 675 10-09-2019, 10:05 PM
Last Post: vsvinit0
No access after reinstall drrob 6 1,283 03-28-2019, 07:54 AM
Last Post: drrob

Forum Jump:


Users browsing this thread: 1 Guest(s)