IP access to website
Im running a Linode512 with a LAMP stack and two domains.
Im doing a project where i need to get some JSON data from a PHP script to an Arduino micro-controller. The Arduino does not support DNS so i have to access the php via the IP address of my linode. But when i try to access the ip the only thing i get is a "Restricted Area" popup in my browser.
Is there some way of pointing that IP to the root of the Linode or some other workaround?
Im new and currently learning, so please bare with me
All help is much appreciated!
Each domain is set up like this:
/etc/apache2/sites-available/domain.one
ServerName domainone.com
ServerAlias
DocumentRoot /srv/www/domainone.com/public_html/
ErrorLog /srv/www/domainone.com/logs/error.log
CustomLog /srv/www/domainone.com/logs/access.log combined
/etc/apache2/sites-available/domaintwo.com
ServerName domaintwo.com
ServerAlias
DocumentRoot /srv/www/domaintwo.com/public_html/
ErrorLog /srv/www/domaintwo.com/logs/error.log
CustomLog /srv/www/domaintwo.com/logs/access.log combined
3 Replies
You could create a config file in /etc/apache2/sites-available called something like "000-default" to send the Arduino (and anyone else accessing the server by IP address) to a location containing the JSON data.
The IP was directing on a subdomain protected by password (.htpasswd) which of course coursed the "Restricted Area" popup.
So i can setup the "000-default" config file like i did with domainone.com and domaintwo.com and direct to a specific folder?
/etc/apache2/sites-available/default was not enabled. It is know and i can point it to where i want.
Thank you so much for your help and have a nice day