How do i make my website inaccesible from public? [closed] - html

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed last year.
Improve this question
i want to make a website that will not be accessed by anyone, there will be a login page in which you can't make an account, only for admins.
for example, i have a homepage which will be on example.com/homepage, if normal people accessed this they wouldn't be able to see it and instead get redirected to example.com/login unless they login with the right account they won't be able to go to the other sections of the websites.

This can be done by configuring your web server. E.g. Apache has multiple choices, the simplest one being with just two files https://httpd.apache.org/docs/2.4/howto/auth.html#gettingitworking
For more complicated solutions you'll need a server side programming language, like PHP.

Related

Should each website have a different MySQL user for a single database? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
If I have multiple websites that access the same MySQL database - should each website use a different MySQL user, or is it ok to use the same user for all of the website?
The database and websites are on the same server.
Are there any pros or cons for each configuration?
I think it depends if you're the only one that's accessing the database, and what kind of website it is. If you're making websites for clients with WordPress for example, or any other CMS where the database credentials are saved in an accessible file (like wp-config), you definitely want to have different databases.
In case you're the only one accessing the database and the websites are all your own, I guess you could use the same user. I think I'd use different ones, even if it's just for clarity, but there is something to say for having just one account regarding security. Having just one account with a strong password means there are less accounts that could get hacked.

Submit Predetermined File From User With HTML Form [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am trying to create an HTML form that submits a predetermined file upon the press of an input button. This file is not located on the machine running the html server, it is located on the end users machine. Idealy I would like a solution that is as light weight as possible.
As far as I know, it's not possible for a form to submit a local file without having the user select the file.
Browsers don't allow javascript (or other scripting technologies) to access the local file system, because it's a security risk.

Upload website in HTML 5 [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
How can I upload my website
How can I choose an URL
How to have many pages in your website which are linked
You need to have some hosting with public IP.
You need to buy domain name from some provider,
Don't understand the question...
You will have to find some hosting, there are a lot of free hostings if you only do your website for fun/school project like cba (free hostings can add ad to your website) etc. Then you will have to use some kind of ftp client to connect to your website server and upload your website files.
When creating account on those websites they will ask you to chouse yor domain name like here.
Coud you explain?

HTML Hide input/post name [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Im looking to hide a post request name from the user, So they cannot post to a URL.
For example, Im looking for something that will avoid users checking the post request name and sending something to bypass the restrictions to insert into a database.
If the POST request comes from the user's browser, then they can inspect it. There is no way to avoid that.
Your only option is to make the POST request from somewhere else (such as your server). There is a good chance that you won't be able to do that (due to dependencies on the request coming from the user or included data they supply).
You mention "restrictions". If those restrictions are currently enforced with client side code: Enforce them with server side code.

creating open source online game [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I started creating online open source game as a project in school. It will be server with n connected clients. But now I have a problem with "security". What to do if one client would used modified source code for changing some restrictions? How can I prevent it? My first idea was make client only for connection to server and server would send all necessary files but I don't like this idea very much. Can you advise me something better? Thank you.
You need to keep your validations in the server. The server should check each client move, and if it's not allowed according to the server's rules - reject it.
You should still keep validations in the client, too, so that users who don't mess with the client code can get speedier responses.