![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 144 Pomógł: 0 Dołączył: 22.03.2015 Ostrzeżenie: (0%) ![]() ![]() |
Witam,
zainstalowałem Vagrant'a na Windowsie, system operacyjny w vagrancie to ubuntu 12.04. Zainstlowałem apache ale on nie startuje nawet nie wyświetla strony startkowe "It's work!" Ustawiłem virtualhost ustawiłem IP pod którym ma łapać tego hosta i nic.. Nie widzi mi przegladarka tej strony. Macie jakieś sugestie jak to naprawić co z tym zrobić? |
|
|
![]()
Post
#2
|
|
![]() Grupa: Zarejestrowani Postów: 8 068 Pomógł: 1414 Dołączył: 26.10.2005 Ostrzeżenie: (0%) ![]() ![]() |
a jak się odwołujesz do vagranta w przeglądarce?
|
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 144 Pomógł: 0 Dołączył: 22.03.2015 Ostrzeżenie: (0%) ![]() ![]() |
Wpisuje dane IP: np. 333.33.33.33
|
|
|
![]()
Post
#4
|
|
![]() Grupa: Zarejestrowani Postów: 6 476 Pomógł: 1306 Dołączył: 6.08.2006 Skąd: Kraków Ostrzeżenie: (0%) ![]() ![]() |
1. Sprawdź czy Apache nie rzucił jakimiś błędami - logi najprawdopodobniej masz w /var/log/apache/...
2. Sprawdź czy w obrębie maszyny wirtualnej serwer działa poprawnie: wget http://localhost/ 3. Pokaż konfigurację przekierowań portów Varnisha. |
|
|
![]()
Post
#5
|
|
Grupa: Zarejestrowani Postów: 144 Pomógł: 0 Dołączył: 22.03.2015 Ostrzeżenie: (0%) ![]() ![]() |
2.
vagrant@cmss:~$ wget http://localhost/ --2015-08-15 10:55:58-- http://localhost/ Resolving localhost (localhost)... 127.0.0.1 Connecting to localhost (localhost)|127.0.0.1|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 202 [text/html] Saving to: `index.html' 100%[======================================>] 202 --.-K/s in 0s 2015-08-15 10:55:59 (2.10 MB/s) - `index.html' saved [202/202] 1. error.log wygląda tak : [Sat Aug 15 07:54:46 2015] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.19 with Suhosin-Patch configured -- resuming normal operations [Sat Aug 15 07:55:29 2015] [notice] caught SIGTERM, shutting down [Sat Aug 15 07:55:34 2015] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.19 with Suhosin-Patch configured -- resuming normal operations [Sat Aug 15 07:58:35 2015] [notice] caught SIGTERM, shutting down [Sat Aug 15 08:01:31 2015] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.19 with Suhosin-Patch configured -- resuming normal operations [Sat Aug 15 08:31:23 2015] [notice] caught SIGTERM, shutting down [Sat Aug 15 08:31:29 2015] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.19 with Suhosin-Patch configured -- resuming normal operations [Sat Aug 15 08:36:27 2015] [notice] caught SIGTERM, shutting down [Sat Aug 15 08:36:28 2015] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.19 with Suhosin-Patch configured -- resuming normal operations [Sat Aug 15 08:37:04 2015] [notice] caught SIGTERM, shutting down [Sat Aug 15 08:37:06 2015] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.19 with Suhosin-Patch configured -- resuming normal operations [Sat Aug 15 08:43:33 2015] [notice] caught SIGTERM, shutting down [Sat Aug 15 08:45:46 2015] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.19 with Suhosin-Patch configured -- resuming normal operations [Sat Aug 15 08:48:53 2015] [notice] caught SIGTERM, shutting down [Sat Aug 15 08:48:59 2015] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.19 with Suhosin-Patch configured -- resuming normal operations [Sat Aug 15 08:49:21 2015] [error] [client 111.11.11.1] File does not exist: /var/www/favicon.ico, referer: http://111.11.11.11/ [Sat Aug 15 08:52:34 2015] [notice] caught SIGTERM, shutting down [Sat Aug 15 08:52:40 2015] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.19 with Suhosin-Patch configured -- resuming normal operations [Sat Aug 15 09:00:32 2015] [notice] caught SIGTERM, shutting down [Sat Aug 15 09:00:38 2015] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.19 with Suhosin-Patch configured -- resuming normal operations [Sat Aug 15 09:01:59 2015] [notice] caught SIGTERM, shutting down [Sat Aug 15 09:02:04 2015] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.19 with Suhosin-Patch configured -- resuming normal operations [Sat Aug 15 09:19:20 2015] [error] [client 111.11.11.1] File does not exist: /var/www/favicon.ico [Sat Aug 15 09:19:20 2015] [error] [client 111.11.11.1] File does not exist: /var/www/favicon.ico [Sat Aug 15 09:29:56 2015] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.19 with Suhosin-Patch configured -- resuming normal operations [Sat Aug 15 09:33:41 2015] [notice] caught SIGTERM, shutting down [Sat Aug 15 09:33:46 2015] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.19 with Suhosin-Patch configured -- resuming normal operations [Sat Aug 15 09:34:40 2015] [notice] caught SIGTERM, shutting down [Sat Aug 15 09:34:45 2015] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.19 with Suhosin-Patch configured -- resuming normal operations [Sat Aug 15 09:50:50 2015] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.19 with Suhosin-Patch configured -- resuming normal operations [Sat Aug 15 10:04:51 2015] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.19 with Suhosin-Patch configured -- resuming normal operations Co do 3 to nie wiem czyu dobrze to sprawdzam : vagrant@cmss:/var/log/apache2$ apache2ctl -S /usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted) apache2: apr_sockaddr_info_get() failed for cmss apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName VirtualHost configuration: wildcard NameVirtualHosts and _default_ servers: *:8080 111.11.11.11 (/etc/apache2/sites-enabled/000-default:42) *:80 is a NameVirtualHost default server 127.0.0.1 (/etc/apache2/sites-enabled/000-default:1) port 80 namevhost 127.0.0.1 (/etc/apache2/sites-enabled/000-default:1) Syntax OK dodatkowo : VagrantFile config.vm.network "forwarded_port", guest: 80, host: 5000 C:\HashiCorp\Vagrant\bin>vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Clearing any previously set forwarded ports... ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat ==> default: Forwarding ports... default: 80 => 5000 (adapter 1) default: 22 => 2222 (adapter 1) ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2222 default: SSH username: vagrant default: SSH auth method: private key default: Warning: Connection timeout. Retrying... default: Warning: Connection timeout. Retrying... default: Warning: Connection timeout. Retrying... default: Warning: Connection timeout. Retrying... default: Warning: Connection timeout. Retrying... default: Warning: Remote connection disconnect. Retrying... ==> default: Machine booted and ready! ==> default: Checking for guest additions in VM... default: The guest additions on this VM do not match the installed version of default: VirtualBox! In most cases this is fine, but in rare cases it can default: prevent things such as shared folders from working properly. If you see default: shared folder errors, please make sure the guest additions within the default: virtual machine match the version of VirtualBox you have installed on default: your host and reload your VM. default: default: Guest Additions Version: 4.2.0 default: VirtualBox Version: 4.3 ==> default: Mounting shared folders... default: /vagrant => C:/HashiCorp/Vagrant/bin ==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision` ==> default: flag to force provisioning. Provisioners marked to run always will still run. C:\HashiCorp\Vagrant\bin>vagrant ssh `ssh` executable not found in any directories in the %PATH% variable. Is an SSH client installed? Try installing Cygwin, MinGW or Git, all of which contain an SSH client. Or use your favorite SSH client with the following authentication information shown below: Host: 127.0.0.1 Port: 2222 Username: vagrant Private key: C:/HashiCorp/Vagrant/bin/.vagrant/machines/default/virtualbox/private_key Wirtualhost 000-defualt: sudo: unable to resolve host cmss GNU nano 2.2.6 File: /etc/apache2/sites-enabled/000-default <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName 127.0.0.1 DocumentRoot /var/www <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> </VirtualHost> <VirtualHost *:8080> ServerName 111.11.11.11 DocumentRoot "/home/vagrant/www/cmss/web" DirectoryIndex app_dev.php <Directory "/home/vagrant/www/cmss/web"> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /app_dev.php [QSA,L] </IfModule> </Directory> </VirtualHost> Ten post edytował Matrix12 15.08.2015, 12:06:25 |
|
|
![]()
Post
#6
|
|
![]() Grupa: Zarejestrowani Postów: 8 068 Pomógł: 1414 Dołączył: 26.10.2005 Ostrzeżenie: (0%) ![]() ![]() |
A z klienta http://localhost:5000 nie działa?
|
|
|
![]()
Post
#7
|
|
Grupa: Zarejestrowani Postów: 144 Pomógł: 0 Dołączył: 22.03.2015 Ostrzeżenie: (0%) ![]() ![]() |
Coś zadziałało dostałem "You are not allowed to access this file. Check app_dev.php for more information.", czyli rozumiem, że jeden boks to jeden projekt tak? Bo mam 111.11.11.11 dla projektu i daje port 5000 i kicha nic nie idzie
|
|
|
![]()
Post
#8
|
|
![]() Grupa: Zarejestrowani Postów: 8 068 Pomógł: 1414 Dołączył: 26.10.2005 Ostrzeżenie: (0%) ![]() ![]() |
nie, jeden box to jeden serwer, możesz sobie tam stawiać ile chcesz..
Generalnie wrzucasz sobie jakis projekt do katalogu, ustawiasz jakąś domenę np. project1.dev i w kliencie ustawiasz w hosts przekierowanie IP_vagranta projest1.dev |
|
|
![]()
Post
#9
|
|
Grupa: Zarejestrowani Postów: 144 Pomógł: 0 Dołączył: 22.03.2015 Ostrzeżenie: (0%) ![]() ![]() |
Rozumiem, natomiast jest problem z vhostami bo on ich po prostu nie łapie.. jak ustawie np. 111.11.11.11:5000 www.example.com w vhosts potem ustawie tak samo w virtualhostach to samo ip to wgl nie łapie mi tego
|
|
|
![]()
Post
#10
|
|
![]() Grupa: Zarejestrowani Postów: 8 068 Pomógł: 1414 Dołączył: 26.10.2005 Ostrzeżenie: (0%) ![]() ![]() |
Bo....
w Vagrant masz ustawić vhost (apache) +/- tak: Kod <VirtualHost *:80> ServerName domain.dev DocumentRoot /var/www/domain.dev <Directory /> Options FollowSymLinks AllowOverride All </Directory> </VirtualHost> a w pliku hosts klienta (nie w Vagrant) np: Kod 192.168.10.10 domain.dev Wtedy odwołujesz się po prostu przez `domain.dev`. Możesz też ustawić w hosts: Kod 127.0.0.1 domain.dev Wtedy odwołujesz się tak: `domain.dev:8080` lub inny wybrany port jaki masz ustawiony do przekierowania z 80 -> .... |
|
|
![]()
Post
#12
|
|
![]() Grupa: Zarejestrowani Postów: 8 068 Pomógł: 1414 Dołączył: 26.10.2005 Ostrzeżenie: (0%) ![]() ![]() |
pokaż config z pliku Vagrant
|
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 5.07.2025 - 00:58 |