apache 2.4 – What step am I missing to effectively update a DocumentRoot?

I am working on a new VPS, and I’ve copied over software from the development server to display at a subdomain.

At present, at least apart from tinkering with /var/www/html, I have not managed to get Apache to display anything else besides the Debian Apache “It worked!” page. My sites-enabled entry reads:

<VirtualHost *:80>
    # The ServerName directive sets the request scheme, hostname and port that
    # the server uses to identify itself. This is used when creating
    # redirection URLs. In the context of virtual hosts, the ServerName
    # specifies what hostname must appear in the request's Host: header to
    # match this virtual host. For the default virtual host (this file) this
    # value is not decisive as it is used as a last resort host regardless.
    # However, you must set it for any further virtual host explicitly.
    #ServerName www.example.com

    ServerName apps.example.com
    ServerAdmin webmaster@localhost
    DocumentRoot /path/apps/www/
    DirectoryIndex index.cgi

    # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
    # error, crit, alert, emerg.
    # It is also possible to configure the loglevel for particular
    # modules, e.g.
    #LogLevel info ssl:warn

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    # For most configuration files from conf-available/, which are
    # enabled or disabled at a global level, it is possible to
    # include a line for only one particular virtual host. For example the
    # following line enables the CGI configuration for this host only
    # after it has been globally disabled with "a2disconf".
    #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

If there is an issue with an index.cgi, I’d expect descriptive error messages (or display of the script’s source code).

What should I be investigating to give this VirtualHost its own DocumentRoot?

Thanks,

usability – How do I effectively show success/failure without using green/red colors?

I have to display a table and the last column of the table shows success/failure of that row.

I cannot use green/red as it represents the result of the subsequent operation a success now does not mean it will be a success in the subsequent operation.

Is there any other color pair that inherently signifies true/false? If not, is there any other way (other than color coding) to effectively convey the meaning?

EDIT:
The column will have strings like:

code: 1xx
message: <some_string_here>

There are some success codes, some failure codes.

Assume 100 to 110 are success codes and 111 to 199 are failure codes.

Now, if there are over 50 rows, it is not easy to quickly filter out success/failure rows.

Legacy Firefox extension to switch effectively between several tabs

I use browser called Pale Moon (for those who do not know, it is a fork of an old version of Firefox that continues to be regularly updated and remains largely compatible with great majority of legacy FF extensions).

I like to have a couple of dozens of tabs opened at the same time, but, normally, I actively work with three or four of them. Can you suggest an old FF extension that would allow to switch between them effectively using keyboard (Ctrl-Tab is nice, but it only allows to switch between two latest tabs, so you are out of luck if you want to go to the pre-previous tab; Ctrl-number is also not perfect, if you have more than nine tabs)?

Of course, it can be done with mouse, but I would prefer to have an alternative keyboard solution.

python – How to use ‘while’ loop and list slicing effectively in this algorithm of Guess The Number Game where lies allowed?

I am making an Algorithm, which can solve the guess the number game with high, low hints where wrong hints are allowed but not in two consecutive guesses (for the game you can see my first posted question in this site, just click on my profile). As I have solved the problem on paper but I have some problems in coding. The task I have to do in code is below:

  1. Let Player picks up a number between 1 and 32. Code will generate a list of 1 to 32 numbers.

  2. Now Computer try to guess the number, his first guess will always be the middlemost element of the list (16 in this case).

  3. First guess = 16. Now player give hint (low or high). If player say low then second guess would be element of list having index of one-fourth of len(list) (8). If player say its high, then second guess would be element having index of three-fourth of len(list). In other words, it hint is high comp guess higher, if it’s low Comp guess lower than it.

  4. Whenever two consecutive hints are opposite (for ex- 16{high}, 24{low}), then code will remove all numbers between them (including both) and prints rest. Now our new list becomes (1, 2,…,14, 15, 25, 26…..32). If series of opposite hints continues then computer will keep guessing (looping) according to 3rd step and removing numbers and printing new list as I stated in this step. For ex- 16{high}, 8{low}, 24{high}, 4{low}, 28{high}, 2{low}, 30{high}, 1{low}, 31{high} now 32 is the only answer. It will keep guessing like this until two same hints are not reached in two consecutive guesses.

  5. When two consecutive hints are same (for ex – 16{high}, 24{high}) or (16{low}, 8{low}). In case of both high we remove the numbers from the list greater than larger of two (which is 24 in first case), i.e. we print new list from 1 to 24 and delete numbers greater than 24. In case of both low, AI should remove numbers from the list lower than smallest of two (8 in second case) and print new list from 8 to 32. But in this condition (of same hints), code will not loop further rather it starts with new list and continues from 1st step by guessing the middlemost number and then onwards.

  6. When computer guesses the correct number and player reply with correct then game finishes after it.

  7. Also new lists doesn’t contains already guessed numbers.

I have tried to do all this in below code but I am troubling in when to loop, how to loop. Indexing error are also troubling me. It throws errors sometimes because of this. Please Help me to fix this and complete my algorithm.

num = list(range(1, 33))
guess = num(round((len(num)) / 2)-1)
print(guess)

while True:
    hint = input()
    if hint == 'correct':
       print('I won')
    if hint.startswith('l'):
        print(num)
        guess1 = num(round((len(num)+1)/4)-1)
        print(guess1)
        hint2 = input()
        if hint2.startswith('h'):
            del num(num.index(guess1):num.index(guess)+1)
            print(num)
            guess2 = num(round(3*len(num)/4)-1)
            print(guess2)
            continue
        if hint2.startswith('l'):
            del num(:num.index(guess1))
            print(num)

    if hint.startswith('h'):
        guess1 = num(round(3*len(num)/4)-1)
        print(guess1)
        hint2 = input()
        print(num)
        if hint2.startswith('l'):
            del num(num.index(guess):num.index(guess1)+1)
            guess2 = num(round(len(num)/4)-1)
            print(guess2)
            print(num)
        if hint2.startswith('h'):
            del num(num.index(guess1):)
            print(num)

teamwork – How to effectively work with teammates whose fixes to bugs cause more bugs?

I have some teammates such that their work contains bugs, of course this is true of all of us. When the bugs are pointed out to them, they’re friendly enough and try to fix the bug. But their fix is ‘wrong’ and just creates a more subtle bug, usually this takes the form of them thinking that the bug is an edge case, and they put some special check in.

Sometimes they will add some extra boolean parameter to something that gets passed around, repeat this several times over and there’s maybe 5 booleans getting passed around.

The most irritating is when they put things in completely the wrong places because they don’t know how to modify some generic thing to handle their case, so they just avoid calling the generic code entirely and write a load of their own stuff.

This creates absolute spaghetti code, and they end up duplicating a lot of code to handle what they perceive as special cases.

I’m a junior developer, the same as them, and we have noone of experience on my team, it’s all juniors. To make matters significantly worse, everyone just merges into master all the time. Usually the reason I find out bugs is I look at a recent commit to master, and I can see in a few seconds that they’ve introduced a bug.

What can I do? Showing them the bug, pointing out their fix isn’t right until they get it right under my guidance

a] Feels patronising, I’m not really superior to these people, all of us are new. But I maybe have picked things up faster than them and I know what they’re doing is wrong.

b] Is time consuming

c] Sometimes they make such a mess that I feel like I have to tear it all down and do it better, which obviously is delicate.

It makes me want to just fix the bug myself as soon as I see it, rather than report it to them. But I know this is wrong, both because it’s insulting and also because it makes more work for me.

How can a player effectively use Booming Blade in combat?

Booming Blade is a fascinating cantrip. Between somewhat murky language and unclear use-cases, there’s a lot of confusion among the 5e community about how exactly you’re supposed to use the Asmodeus-blasted spell.

Booming Blade’s description reads as follows:

As part of the action used to cast this spell, you must make a melee attack with a weapon against one creature within the spell’s range, otherwise the spell fails. On a hit, the target suffers the attack’s normal effects, and it becomes sheathed in booming energy until the start of your next turn. If the target willingly moves before then, it immediately takes 1d8 thunder damage, and the spell ends.

Most of the confusion about its use cases stems from the following fact: if you’re in range to use the cantrip on an enemy, then they’re in range to hit you, so why would they ever move from their position, thereby triggering the damage? This leads to all kinds of theory-crafting on how to force target of the spell to move, which inevitably leads to strategies that are either too difficult or too costly (in terms of action economy or combat resources) to be practical.

So, how can a player effectively use Booming Blade in combat?

In order to narrow down potential answers and prevent opinion-based responses, the following criteria define “effective use” of Booming Blade:

  1. The cantrip is used in a way that guarantees one of the following:
    • The target suffers the secondary portion of the damage.
    • The player is able to influence the battlefield in such a way that increases their odds of success in some way that does not involve directly dealing damage via the cantrip; e.g. forcing the enemy to move into a desirable location.
  2. The usage of the cantrip is “economically efficient” with respects to action-economy; i.e. the player is not reducing their effectiveness by choosing this Action over another.

encryption – Can a structured (text) document be effectively encrypted

My situation:

I want to encrypt an HTML document. My question is, if the following is known, is that going to weaken encryption?

  • It is a text-based document
  • It starts with <DOCTYPE HTML> or a few variants of
  • This is followed by an <HTML> tag, followed by a <HEAD> tag, which contains a number of ‘

Would this knowledge help a hacker to decrypt without the decrypt key? Would such knowledge make my documents effectively un-encryptable?

My apologies if this is a very simple question. I am a neophyte.