Reputation: 44
I have developed a web application in codeigniter. My server is XAMPP. I have my application in server so i am running application in server browser with the url of localhost/app_name.
My Question is how to run my application in server client machine in with IP address do i have to do any setup for this?
Upvotes: 0
Views: 3545
Reputation: 84
If you are using the local development server, add a host parameter and set it to 0.0.0.0
like below:
php spark serve --host 0.0.0.0
This will bind the service on all interfaces on the local machine so another device can access it, provided your firewall is disabled or allows ingress traffic to the port being listened to.
Upvotes: 1
Reputation: 4331
Yes you can access your server from other machine. In that case two issue is possible.
for 2 you would have to have real(public) IP address.
for 1: you can access only from local network. Local ip address is enough.
in both case you need to make a small change in httpd.conf
file.
#your root directory address in full
<Directory "C:/Program Files/*/www">
Order allow, deny
Allow from all
</Directory>
Note: After changing, you need to restart your Apache server. then you can access from outside your own machine.There is lot of answers on visiting sites on local.
Upvotes: 1
Reputation: 3329
Try following,
Step 1: Add IP as Listner to httpd.conf
file of your Apache server
Listen 80 Listen [your IP here]:80
Step 2: Find the following code
<Directory "cgi-bin">
AllowOverride None
Options None
Order allow,deny
Deny from all
</Directory>
and replace above code with following lines
<Directory "cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
Thats all you need to do if you want to access site over local network.
Upvotes: 1