Can I remove the default Apache2 sites? [closed] - configuration

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I'm setting up my first Apache2 server and having a bit of an issue. I want to have several VirtualHosts that are pointed to by separate domains, which I have working correctly. However, when you simply type in the server IP address, it displays the first declared virtualhost (it used to display the default apache2 page, but I ran:
$ a2dissite default
Now the ip address displays the first declared virtualhost. Is it possible to force the ip address to display nothing, while the domains display their respective folders?

I believe I got the desired result by reenabling default with:
$ a2ensite default
and the disabling directory indexing by changing "Indexes" to "-Indexes" in the default file under sites-available. It now throws a 403 Forbidden error.

Related

Can I host a HTML site on a server without php and database? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
At the moment I am working at a HTML page and I want to host it on a server, so I need a database or php for this?
Just put your file(s) in the correct directory. What's your web server ? If nothing is changed:
If you use Apache, your html goes in the directory configured in HttpConf as DocumentRoot.
In case of IIS, put your html in C:\inetpub\wwwroot
You can then access your html in a browser using http://yoururl/yourfile.html
No, you can use something like nginx for that. This is a reverse proxy but it can be used to host a directory.

Browsers can't open .php file in xampp [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I was stuck here for a couple of hours. I tried opening my .php in htdocs (localhost/users) using Internet Explorer but it redirect me to download my.php file instead of opening it. I've also tried using Chrome and Opera but it shows cannot locate the file (localhost/users ).I've other related questions here but it seems none is fitting to my question.
Don't open a PHP file directly. Navigate to the URL your web server is running on, usually http://localhost, but the port could differ depending on your configuration. If you set the web server (Apache) to run on a port other than 80, use a URL like http://localhost:1234 instead, where 1234 is the port number.

How to block an IP, if getting many http/apache/mysql requests in a second [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
if some one tried force burst attack on my website. how can i block their IP address.
i mean, i want to block an IP if, getting many http/Apache/SQL requests per second. how can i prevent those force burst attacks
Linux Server
thank in advance
In your .htaccess you can add something like:
order allow,deny
deny from <ip address>
allow from all
Or depending upon your operating system you can add a rule to your iptables.
For example, here is how you would do it in ubuntu.

LocalSettings.php not found - mediawiki installation [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
When I wanna install mediawiki 1.18.2, at the beginning of the installation process it tells that "LocalSettings.php not found." and after clicking next a blank white page appears. It tried to find LocalSettings.php on my server but no such file existed. what should I do?
From the MediaWiki website installation instructions:
This is an index of all supported configuration options based on the DefaultSettings.php file.
Never edit DefaultSettings.php; copy appropriate lines to LocalSettings.php instead and amend them as appropriate.
Create your own LocalSettings.php by copying DefaultSettings.php, and then go through and delete the stuff you don't need/want.

blogger.com subdomains [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this question
When one registers for a blog in blogger.com, a sub-domain gets created i.e. your_blog_name.blogger.com
My question is - Is there no limit to the number of sub-domains you can create with a single domain name?
I am just curious as to how blogger (or any other blog hosting platform) does this?
This can be done by a catch-all A record rule in your DNS server configuration. For example, in bind, you would use something like this:
*.example.com. IN A 127.0.0.1
This would make anything.example.com resolve to 127.0.0.1. Then, using an appopriate VHost on your http server, you can redirect all requests to a particular server-side script (for example PHP), which can then detect the hostname that was used, and respond with the content required.
There are restrictions on the characters that can be used (actually, two separate sets of restrictions due to the way IDNs work). There are practical limitations in terms of length. Beyond that no. Indeed, it's not much different for the entity in charge of .blogger.com to create a subdomain of that than for the entity in charge of .com to do so, and there were 80,000,000 of those at the start of last year .