Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

created file in VM index.php see in browser but Not see the file in Mac #2638

Closed
lse123 opened this issue Apr 10, 2017 · 10 comments
Closed

created file in VM index.php see in browser but Not see the file in Mac #2638

lse123 opened this issue Apr 10, 2017 · 10 comments

Comments

@lse123
Copy link

lse123 commented Apr 10, 2017

I use a Mac - created file in VM(vagrant ssh) index.php see in browser from domain(set hosts file) but not see the file in Mac... where is it...? config.yaml apache section is // using virtual box

apache:
    install: '1'
    settings:
        version: 2.4
        user: www-data
        group: www-data
        default_vhost: true
        manage_user: false
        manage_group: false
        sendfile: 0
    modules:
        - proxy_fcgi
        - rewrite
    vhosts:
        av_ov9g4n4m1oar:
            servername: awesome.dev
            serveraliases:
                - www.awesome.dev
            docroot: /var/www/awesome/web
            port: '80'
            setenvif:
                - 'Authorization "(.*)" HTTP_AUTHORIZATION=$1'
            custom_fragment: ''
            ssl: '0'
            ssl_cert: LETSENCRYPT
            ssl_key: LETSENCRYPT
            ssl_chain: LETSENCRYPT
            ssl_certs_dir: LETSENCRYPT
            ssl_protocol: ''
            ssl_cipher: ''
            directories:
                avd_svq42dy2219h:
                    path: /var/www/awesome/web
                    directoryindex: 'index.php app.dev'
                    options:
                        - Indexes
                        - FollowSymlinks
                        - MultiViews
                    allow_override:
                        - All
                    require:
                        - 'all granted'
                    custom_fragment: ''
                    provider: directory
            files_match:
                avfm_e0dxtzqs5xah:
                    path: (app_dev|config)\.php$
                    sethandler: 'proxy:fcgi://127.0.0.1:9000'
                    setenv:
                        - 'APP_ENV dev'
                    custom_fragment: ''
                    provider: filesmatch
                avfm_cguur35tbh1i:
                    path: app\.php$
                    sethandler: 'proxy:fcgi://127.0.0.1:9000'
                    setenv:
                        - 'APP_ENV prod'
                    custom_fragment: ''
                    provider: filesmatch
                avfm_vf80if55ingm:
                    path: \.php$
                    sethandler: 'proxy:fcgi://127.0.0.1:9000'
                    custom_fragment: ''
                    provider: filesmatch

@lse123
Copy link
Author

lse123 commented Apr 10, 2017

I searched my Mac for index.php but not found

well???

@jtreminio
Copy link
Member

Not a puphpet question. Sounds like you should read up a bit on Vagrant.

Look at your shared folders. Whatever corresponds to /var/www/awesome/web is where your file will be on your host - assuming you created the file inside your VM at that location.

@lse123
Copy link
Author

lse123 commented Apr 11, 2017

But searched all mac and index.php not found... what block of config.yaml to post here - shared folders are under what block? This file has any passwords in it? Can post all file?

@lse123
Copy link
Author

lse123 commented Apr 11, 2017

I searched shared folder and nothing found in config.yaml... what code add in this file (and where to add it ... as independent block...?) ? Also only found this >>>>

synced_folder:
vflsf_g2calbsddx2l:
owner: www-data
group: www-data
source: ./
target: /var/www/greet
sync_type: nfs
smb:
smb_host: ''
smb_username: ''
smb_password: ''
mount_options:
dir_mode: '0775'
file_mode: '0664'
rsync:
args:
- '--verbose'
- '--archive'
- '-z'
exclude:
- .vagrant/
- .git/
auto: 'true'
usable_port_range:
start: 10200
stop: 10500
post_up_message: ''

@lse123
Copy link
Author

lse123 commented Apr 11, 2017

NFS is highly recommended for OSX and Linux! Make sure to install the vagrant-bindfs plugin with $ vagrant plugin install vagrant-bindfs. More information about NFS, and more information about vagrant-bindfs.

THIS NEEDED INSTALL FOR MAC ?

@lse123
Copy link
Author

lse123 commented Apr 11, 2017

NEEDED MODIFY (about shared folders) config.yaml OR THIS Vagrantfile???

@jtreminio
Copy link
Member

Don't modify the Vagrantfile unless you know what you want to do with it.

Wherever you ran vagrant up is what's considered your shared folder's root and will be mapped to your vm's /var/www/greet. Look there.

@lse123
Copy link
Author

lse123 commented Apr 11, 2017

shared folder's root
well ./ this what means if vagrant file in /Users/user/Documents/Vagrant/

above shows ./ as shared where to look?

@lse123
Copy link
Author

lse123 commented Apr 14, 2017

just reply this: I needed / required the second line below... ?

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.synced_folder '.', '/var/www'
end

@lse123
Copy link
Author

lse123 commented Apr 14, 2017

I DID AND NOW WORKING

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants