Apache

SpaceshipSpaceship
Watch

Albino

Munky DesignsEstablished Member
Impact
17
This isnt really "programming", but im not sure where else to put it.

I would like to host my website on my pc, but I would also like to turn off my pc once in a while, to give it a rest.

I have installed apache, php and mysql, and all was going well ( i was testing using localhost), but come the day for people to test my site, i struck a problem.

I dont have a static ip.

So is there anyway I can configure my servername in my httpd.conf to be relative to my ip at that time?

Thanks

Todd
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
I also have a similar need,
I have a file that's too large to be sent over e-mail. I have Apache set up in my local network. How do I start apache so that people from the INTERNET can access it for a small period of time (ex, so that I can close port 80 after the file's downloaded by my friend who needs it) and then shut it down?
 
0
•••
Not very difficult to do....

1. Use dynip or similar service to have dynamic name service. Each time your IP change, client software on your PC will notify the new IP. You can even use eNom to do that, every name has dynamic dns feature. As client software, I recommend DynSite.

2. No need to configure apache but you can change ServerName in the httpd.conf if you want.

3. To block access to your local apache, you can use firewall and block the port used. A lot of firewall allow you to configure port access with time, day, ip, etc. settings.

4. To allow access you can use a basic apache authentification. Use a .htaccess file like that in your root directory :

PHP:
AuthType Basic
AuthName "Acces"
AuthUserFile "C:\path_for_password_file"

order deny,allow
deny from all
allow from 127.0.0.1
allow from 192.168.1
require valid-user
satisfy any
And use the htpasswd.exe from a dos window to create the password file. You can find this in the bin folder in apache.
 
0
•••
you might just want to use an easier server program, try xampp, it install apache, ftp and a bunch of other stuff you won't need but it works great and is alot easier to set up then doing all the coding :)
 
0
•••
You can also check out zoneedit.com as they provide you a way to point your domain to a non static IP.
 
0
•••
thanks everyone!

ill try them all out soon :)
 
0
•••
Appraise.net

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back