How do I setup my Linode without a domain?

hey, I want to use my linode without a domain name. I host some PHP scripts that I want to execute. Currently my content is in var/www/html/olddomain.com. How do I set it up so I can access like this : e.g. http://xxx.xxx.xx.xx/index.php ? Do I need to edit the local hosts file? Where would I move my content to?

Any pointers on this would be really appreciated. thanks!

9 Replies

With Apache, the first configured site will handle any requests that don't ask for an explicit host. This includes requests going to a URL using an IP address.

You should be able to just enable the default site and then put the files you want to serve in the directory specified as its DocumentRoot (often this is /var/www/html, but it depends on the distribution). So if you put index.php in the DocumentRoot, people would be able to access it at http://12.34.56.78/index.php where they'd substitute your actual IP address.

@Vance:

With Apache, the first configured site will handle any requests that don't ask for an explicit host. This includes requests going to a URL using an IP address.

You should be able to just enable the default site and then put the files you want to serve in the directory specified as its DocumentRoot (often this is /var/www/html, but it depends on the distribution). So if you put index.php in the DocumentRoot, people would be able to access it at http://12.34.56.78/index.php where they'd substitute your actual IP address.

Thanks for this. How would I enable the default site?

You would run a2ensite name-of-site where name-of-site is the name of the site configuration file in sites-available. If you tell us what operating system and version you are using, we can provide more specific guidance.

@Vance:

You would run a2ensite name-of-site where name-of-site is the name of the site configuration file in sites-available. If you tell us what operating system and version you are using, we can provide more specific guidance.

Ah I got it! Got it working. Thanks a lot for your help :D

another way, you can add your domain and your IP to your client. (in windows C:\Windows\System32\drivers\etc\hosts)

or in linux /etc/hosts

Just keep in mind that the last method mentioned would only work for you locally on that specific computer.

@kekearif:

@Vance:

With Apache, the first configured site will handle any requests that don't ask for an explicit host. This includes requests going to a URL using an IP address.

You should be able to just enable the default site and then put the files you want to serve in the directory specified as its DocumentRoot (often this is /var/www/html, but it depends on the distribution). So if you put index.php in the DocumentRoot, people would be able to access it at http://12.34.56.78/index.php where they'd substitute your actual IP address.

Thanks for this. How would I enable the default site?

Park you domain and then bind your apache to your server's ip address. don't forget to open the port 80 if you are listening on that port.

restart apache server and you should now see your default site.

Lucky Patcher - software with a set of useful features for advanced management of applications installed on smartphones.
https://apkxyz.com/pt/apk/lucky-patcher-apk

You can certainly use your Linode from its IP address, or even add it as a subdomain in another domain (like static.example.com). It'll work either way.
https://get-shareit.com
https://get-vidmateapk.com

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct