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
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
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
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 - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
How to set up File Manger for Sentora? donaldaugust 1 3 ,855 01-11-2022, 05:01 AM
Last Post: Nigel
SSH Access rsthomas 2 5 ,892 01-06-2021, 12:14 AM
Last Post: rsthomas
Install guide wget over http? edavidf 5 11 ,151 12-15-2020, 07:07 PM
Last Post: jibranahmed

Forum Jump:


Users browsing this thread: 1 Guest(s)