404 error – not found po instalaci nette
- Burrn.P
- Člen | 28
Dneska jsem se pustil do veskereho nastaveni podle navodu tady: http://blog.frd.mn/…ng-homebrew/
nasledne jsem instaloval composer a pres nej nette, pri zkousce http://localhost/nette-blog/www/
mi to hlasi 404 Error – Not Found
A fatal 404 exception has occurred. The current page request will be
terminated.
Press the back button to return to the previous page.
Send us an e-mail to let us know about this or enter Konami code.
Press CTRL+ALT+DEL again to restart your computer. You will
lose any unsaved information in all applications.
Press any key to continue _
jedna se o modrou obrazovku, kterou jsem jeste nikdy nevidel, asi nejaky konfig z predchoziho nastavni, v tuhle chvili sem dost zmatenej a vubec netusim co dal, prosim o radu :)
kdyz zadavam cd: nette-blog: cd nette-blog && chmod -R a+rw temp log do iTerm, hlasi to No such file or directory. – nema to souvislost s chybou? Diky
- pouzivam MAC OS X
- Burrn.P
- Člen | 28
Burrn.P napsal(a):
Dneska jsem se pustil do veskereho nastaveni podle navodu tady: http://blog.frd.mn/…ng-homebrew/
nasledne jsem instaloval composer a pres nej nette, pri zkousce http://localhost/nette-blog/www/
mi to hlasi 404 Error – Not Found
A fatal 404 exception has occurred. The current page request will be terminated.Press the back button to return to the previous page.
Send us an e-mail to let us know about this or enter Konami code.
Press CTRL+ALT+DEL again to restart your computer. You will
lose any unsaved information in all applications.
Press any key to continue _jedna se o modrou obrazovku, kterou jsem jeste nikdy nevidel, asi nejaky konfig z predchoziho nastavni, v tuhle chvili sem dost zmatenej a vubec netusim co dal, prosim o radu :)
kdyz zadavam cd: nette-blog: cd nette-blog && chmod -R a+rw temp log do iTerm, hlasi to No such file or directory. – nema to souvislost s chybou? Diky
- pouzivam MAC OS X
zkousel jsem znovu opakovat proces s komposerem, ale zmenil sem nazev pri vytvareni projektu, ted mam ve slozce user/nette-blog a dalsi slozka se jmenuje user/nazev, uz tomu opravdu nerozumim, muze mi nekdo pomoci pls?
- Armin Schmidtke
- Člen | 20
Example pro testapp.dev
1. Instalace Composerem:
composer create-project nette/sandbox testapp.dev
2. Konfigurace server – do sites-available pridame testapp.dev:
server {
listen 80;
server_name testapp.dev;
index index.php index.html index.htm;
set $root_path '/var/www/testapp.dev/www';
root $root_path;
access_log /usr/local/etc/nginx/logs/testapp.access.log main;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param REQUEST_URI $uri?$args;
include fastcgi_params;
}
location ~*^/(css|img|js|flv|swf|download)/(.+)$ {
root $root_path;
}
location ~ /\.(ht|gitignore) { # deny access to .htaccess files, if Apache's document root concurs with nginx's one
deny all;
}
location ~ \.(neon|ini|log|yml)$ { # deny access to configuration files
deny all;
}
location = /robots.txt { access_log off; log_not_found off; }
location = /favicon.ico { access_log off; log_not_found off; }
}
3. Symlink testapp.dev do sites-enabled:
ln -s -i -v /usr/local/etc/nginx/sites-available/testapp.dev /usr/local/etc/nginx/sites-enabled/testapp.dev
4. Do Virtual host
$ sudo nano /etc/vhosts
pridame
127.0.0.1 testapp
- Burrn.P
- Člen | 28
Armin Schmidtke napsal(a):
Example pro testapp.dev
1. Instalace Composerem:
composer create-project nette/sandbox testapp.dev
2. Konfigurace server – do sites-available pridame testapp.dev:
server { listen 80; server_name testapp.dev; index index.php index.html index.htm; set $root_path '/var/www/testapp.dev/www'; root $root_path; access_log /usr/local/etc/nginx/logs/testapp.access.log main; location / { try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_param REQUEST_URI $uri?$args; include fastcgi_params; } location ~*^/(css|img|js|flv|swf|download)/(.+)$ { root $root_path; } location ~ /\.(ht|gitignore) { # deny access to .htaccess files, if Apache's document root concurs with nginx's one deny all; } location ~ \.(neon|ini|log|yml)$ { # deny access to configuration files deny all; } location = /robots.txt { access_log off; log_not_found off; } location = /favicon.ico { access_log off; log_not_found off; } }
3. Symlink testapp.dev do sites-enabled:
ln -s -i -v /usr/local/etc/nginx/sites-available/testapp.dev /usr/local/etc/nginx/sites-enabled/testapp.dev
4. Do Virtual host
$ sudo nano /etc/vhosts
pridame
127.0.0.1 testapp
diky zes jako jedinej odpovedel, krok jedna je zamnou, krok 2 nevim jak udelat, poradis pls?
- Armin Schmidtke
- Člen | 20
Pod /usr/local/etc/nginx/sites-available/ je default. Muzes ho kopirovat, prejmenovat a prepsat jako v krok 2.
- Burrn.P
- Člen | 28
Armin Schmidtke napsal(a):
Pod /usr/local/etc/nginx/sites-available/ je default. Muzes ho kopirovat, prejmenovat a prepsat jako v krok 2.
cestu /usr/local/etc/nginx/sites-available, namam – je to k mac os?
To tu vazne nikdo neni kdo by poradil a ty rady mohl poskytnout v nejakem lepsim case, treba odpovidat do hodiny, do dvou? Asi toho chci dost, ale i tak diky :)
Editoval Burrn.P (14. 11. 2014 17:11)
- Armin Schmidtke
- Člen | 20
Je to pro Mac OS podle ten navod jak jsis to instaloval ty – Homebrew atd. Mam to podobne instalovani a funguje vsecko jak ma.
Edit: pod jakou cestu mas nginx? Tam by jsi pak take mel najit sites-enabled
Editoval Armin Schmidtke (14. 11. 2014 18:34)
- Armin Schmidtke
- Člen | 20
Pouzival jsi ten TUTORIAL na instalaci NGINX atd.?
Nebylo by lepe pouzivat pro zacatek neco jako XAMPP, MAMP anebo Ampps?
- Armin Schmidtke
- Člen | 20
pokut to mas podle tutorial, tak kdyz otevres FINDER a macknes SHIFT + COMMAND + G (Go to Folder), zadas tam /usr/local/etc – mel by jsi videt nginx slozku.
- Burrn.P
- Člen | 28
Armin Schmidtke napsal(a):
pokut to mas podle tutorial, tak kdyz otevres FINDER a macknes SHIFT + COMMAND + G (Go to Folder), zadas tam /usr/local/etc – mel by jsi videt nginx slozku.
The folder can't be found to pise, posles mi na sebe do email hodit Facebook a parodit mi pres messenger pls?
Editoval Burrn.P (14. 11. 2014 19:36)