Hot answers tagged

6

What will occur depends on how you have setup your web server. A web server may be setup to display an index page - that is a page that is displayed when a directory is accessed. In this case, the server will typically try all the files listed (e.g. index.htm, index.html, index.php, etc) in the order listed, and display the first one that is available, or ...


4

Probably the server doesn't recognize the script as executable, and that's why it offers it as a downloadable file. These lines should be present in your Apache config. Note that the path may need to be changed for the .so modules, depending on your configuration: *nix: # -- if you're using PHP 5, uncomment this line to activate it LoadModule php5_module ...


4

As Stephen Ostermiller says, in this case you want to add "conf" to the line beginning with "text/plain" in: includes/mime.types In other cases though it may not be this simple. When you upload a file, mediawiki executes the PHP function mime_content_type("my_uploaded.wth"); which takes the result and looks it up in includes/mime.types. If you find ...


4

Just as a matter of explanation for future users. Your 000-default.conf file is a catch-all site and should be left alone. It is good for security. It can be frustrating when a site configuration does not work and the default site is served. I get it. Still, leave it alone. Many people are unaware of why the default site exists. Here is a bit of an ...


3

Try to make one setting default and other one turned on by condition: expires max; valid_referers none blocked something.com; if ($invalid_referer) { rewrite ^ /leech.jpg; expires epoch; }


3

In order to work with two names under one site you have Respond from Apache side on both Host request (you done it) Configure DNS for domain in order to have 2 URLs route to the correct host In short: nslookup foobar.com and nslookup www.foobar.com must return answers and answers to be identical Your impression about <Directory> container ...


3

You could use a reverse proxy via mod_proxy. The Apache Httpd configuration would be along these lines: ProxyPass /6666/ http://localhost:6666/ <Location /6666/> ProxyPassReverse /6666/ Order deny,allow Allow from all </Location>


3

Edit app/config/app.php and make sure debug is set to true: 'debug' => true,


3

The best way is to go to this directory: yourproject/app/storage/logs. Inside the logs folder. you will see a laravel.log file. This is like a stack trace which tells you how your programs is implemented and what specific type of error it is. You just need to copy the error message and search on Google.


2

I can't think of any reason why one would want this sort of setup, but to make the best of a bad situation, I would give the sites different docroots to avoid unnecessary duplication of content/URLs and make the sites more maintainable, e.g.: /var/www/site1 /var/www/site2 /var/www/site3 To share assets, you ought to just keep the assets in the main site's ...


2

Supposing your server space supports PHP, you can: 1) Place into the public_html folder a file called idious-counter.php with this code into it: <?php define("COUNTER_START_VALUE", 0); define("COUNTER_LOG", "idious-counter.log"); //name of file you want to use to save the counter value ...


2

To be able to access a local resource as if it were the main site you need to do two things: Edit your hosts file such that your computer thinks that your domain name is served by localhost. Your hosts file should contain a line with 127.0.0.1 in it and your host name would need to be added to that line, something like: 127.0.0.1 localhost ...


2

Apache applies configurations for directories to a request from smallest to largest. In essence the <Directory /> section specifies virtual host defaults; since every other possible directory will have that portion in its path. If multiple (non-regular expression) sections match the directory (or one of its parents) containing a document, then ...


2

You can use the error_reporting function at the top of each file to get round the fact that your server doesn't seem to be obeying what you've configured.


2

set_include_path(get_include_path() . PATH_SEPARATOR . 'phpseclib'); You place the library/extension files wherever you want to place them (wherever is appropriate for your server setup or web application) - this I believe is what the example above is showing you. Replace phpseclib with the absolute server path of where you decide to save the phpseclib ...


2

The problem is that code inside “extension tags” like <syntaxhighlight> is not parsed, which is why the {{{code}}} is not replaced with the value of the code parameter. What you need to use is to use {{#tag}} parser function: {{#tag:syntaxhighlight|{{{code}}}|lang=java|style=background-color:lightgray; border:1px dashed gray;}}


2

You didn't write ; at the end of the line. :) I've done the same mistake - and got the same alert.


2

edit and createpage are needed to edit a userpage (see list of permissions). There is no core permission to differentiate own pages from others' pages, but extensions might add one (e.g. UserPageEditProtection does, although it does not seem to be up-to-date).


2

Ok I figured it out from hard research. The answer is 21 seconds is WAY TOO HIGH! This is because an attack called Slowloris exists. What it does in a nutshell is hold up apache slots for about as long as the timeout value specified in apache config. This in turn prevents legit users from even connecting to the website. Because connections now need less than ...


1

If you want the website's email to be functional & website when browsed to show a Not Found page, simply point the A record to a non route able address. MX & other records should not be modified.


1

Yet another alternative: If you have a master config file you can place the error reporting function in that file. It obviously then will affect the entire website. Yet another alternative: Place this in an htaccess file in the root directory of the site. Should affect every domain: php_flag display_errors off (or whatever you want it to be)


1

The easiest thing is to open a ticket on your new webhoster and and ask him how you could set up php.ini directives per your account. Given the code you showed it seems you were on a server with LiteSpeed where you can use php_flag in .htaccess file. Maybe the new server where you moved is using Apache + suPHP (and NOT LiteSpeed) in such case you would ...


1

I would strongly recommend for the second one that has special characters that you use the <LocationMatch> Directive. The <LocationMatch> directive limits the scope of the enclosed directives by URL, in an identical manner to <Location>. However, it takes a regular expression as an argument instead of a simple string. ...


1

I believe the problem is that you've created the subdomain "blog.mydomain.com" already, and are trying to recreate that subdomain with the CNAME record. Try deleting the subdomain you've already created, and then try adding the CNAME record.


1

Here is an apache virtual host configuration that should work for you to reverse proxy your web app through Apache. Replace mydomain.example.com with your actual domain name. You will need to have mod_poxy and mod_proxy_http loaded by apache and if you use ProxyHTML directives, you will need mod_proxy_html as well. <VirtualHost *:80> ServerName ...


1

Actually you CAN host multiple SSL sites on port 443. The following code in your apache config file will do the trick. Otherwise, you can use whatever ports you want. The disadvantage will be that users will have to include the port number in the URL (eg. https://yourdomain.com:445/) ## SSL (HTTPS) PORT 443 Listen 443 NameVirtualHost *:443 LoadModule ...


1

The answer: Lowering load to HDD hosting system or sometimes to CPU. Why: It depends on scripts which rules the whole process. It may be cron scripts which runs every 5-10 min or scripts run when system idle or ... This situation similar to github pages - all changes visible with delay up to 10 minutes. This time set on nginx config file as cache time For ...


1

I think you want to remove the .php extension, so I'll give the .htaccess code to accomplish that: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php That should be located in the root directory. So suppose there is a file in the root folder named index.php, you can then access it at: ...


1

Please verify if /contacts exists with a folder permission of 755. The files under /contacts should have a permission of 644. Also rename your current .htaccess file and create a new .htaccess file with the following code. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d ...


1

403 Forbidden You don't have permission to access /contacts on this server Ensure that folders Users, username and Sites are chmod 755 chmod -R 755 /home



Only top voted, non community-wiki answers of a minimum length are eligible