Oh my god, there are so many errors, its definately incredible.
First of all: no, it is NOT the right forum or do you think "Grundlagen und Wissenswertes" sounds English? You posted into the german board.
Now all the errors:
a) did you read this comment in hosts file:
- Code: Select all
# localhost is used to configure the loopback interface
So if you want to define a new host, which should also work from another PC than only the Xampp server, DO NOT USE localhost! localhost is a reserved special name for the loopback device (= the same local PC). Replace localhost in all occurences by another name (you are free to choose any name, but NOT localhost).
b) it looks, as if mixed up what you did on the Xampp PC and/or on the other PC. This line:
- Code: Select all
127.0.0.1 localhost.
*should* be on the Xampp server (but you described it vice verse).
and this line
- Code: Select all
192.168.1.191 localhost
*should* be on the client PC. Where 192.168.1.191 is the LAN IP from the Xampp Server. Anyway, DO NOT USE localhost (dont forget that!).
c) At next, in the first line you have have dot "." accidently at the end, this is an error:
- Code: Select all
127.0.0.1 localhost.
it *should* be without dot:
- Code: Select all
127.0.0.1 localhost
and again: DO NOT USE localhost here.
d) The DocumentRoot of your VirtualHost declaration already contains the wordpress folder:
- Code: Select all
DocumentRoot "/opt/lampp/htdocs/wordpress"
You may do so, but if you do so, you MUST NOT provide this foldername again in the URL like you did: you entered
http://localhost/wordpress/test.html, but this of course does not work, as it finally yields to /opt/lampp/htdocs/wordpress/wordpress/test.html (twice the wordpress folder!). Therefore, either leave out the wordpress folder in the DocumentRoot declaration, OR leave it out in the URL. You MUST NOT provide it twice.
e) Last not least, you should have done all these configurations BEFORE(!) you install wordpress and while installing wordpress, you *should* use the (new) hostname instead of "localhost" during the installation. You will now have the problem, if you call wordpress from another PC via the new hostname (lets call it "xamppserver"), you have to enter either
http://xamppserver or
http://xamppserver/wordpress (depends on how you declare the DocumentRoot). But as you already installed wordpress on "localhost", some links will point to localhost (especially CSS stylesheets and pictures), but these cannot be resolved correctly, as localhost always points to the local PC (and not the Xampp PC). Thats the reason, why you should not use localhost. You now have to edit wp-config.php and find out, if there are any URLs inside wp-config.php, that contains "localhost", and then replace "localhost" by the new hostname "xamppserver". If you are following these advices correctly, you may succeed and everything should work fine.